-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fresh v6 astro-create project tsconfig complains of missing node types #15785
Copy link
Copy link
Closed
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)
Description
Astro Info
Astro v6.0.0-beta.19
Vite v7.3.1
Node v24.11.0
System Windows (x64)
Package Manager npm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
Describe the Bug
Astro 6 is preparing for TypeScript 6 which includes adding ["node"] to compilerOptions.types (see https://v6.docs.astro.build/en/guides/upgrade-to/v6/#changed-typescript-configuration). VS Code now complains with the following message:
[{
"resource": "/.../astro-project/tsconfig.json",
"owner": "typescript",
"severity": 8,
"message": "Cannot find type definition file for 'node'.\n The file is in the program because:\n Entry point of type library 'node' specified in compilerOptions",
"source": "ts",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2,
"origin": "extHost2"
}]
If the "node" type dependency is going to be explicitly set, I believe @types/node should be added automatically as a dev dependency as well.
What's the expected result?
No type errors with a fresh project.
Link to Minimal Reproducible Example
https://github.com/jpc-ae/astro-minimal
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)