In VSCode, monorepo's sub-packages should load @types/node
which has been installed in their own node_modules
#60748
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
🔎 Search Terms
vscode monorepo load types
🕗 Version & Regression Information
Let's say I hava a monorepo. There is a unit test file in a sub-package. If this unit test file cannot match any
tsconfig.json
in this monorepo, there will be some importing errors (egimport assert from "node:assert"
) in VSCode editor, even though it has already installed@types/node
.⏯ Playground Link
https://github.com/zanminkian/bug-report/tree/typescript/should_load_nearest_node_modules_types_bug
💻 Code
Please open https://github.com/zanminkian/bug-report/tree/typescript/should_load_nearest_node_modules_types_bug and read the readme to reproduce. Thanks.
Reproduce steps:
typescript/should_load_nearest_node_modules_types_bug
branch.pnpm i
in the root of this project../packages/foo/src/foo.spec.ts
file.Some related codes:
🙁 Actual behavior
See the screenshot above. There are some importing errors.
🙂 Expected behavior
No errors in VSCode.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: