-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node types can be used in any package #5834
Comments
Well TypeScript now picks up node types from: It looks like this can be fixed via "compilerOptions": {
"types": []
} But much like #5816, this should really be the default and node types should be enabled only where they're required, rather than selectively disabled for packages where they're not required. Obviously this is all complicated by the fact that |
We can configure an environment via eslint: https://eslint.org/docs/latest/user-guide/configuring/language-options Maybe We would then also have to turn on the |
Also if our tsconfigs cause problems, we can always shuffle them around or pass the |
Why was this issue closed? While we think it would be helpful to solve this issue, we're busy with a lot of other tasks at the moment. Please feel free to leave a comment if you think this issue should be reopened. |
Steps to Reproduce
Go into any file in
@sentry/utils
and add a reference toglobal.process.version
and no error is reported during TypeScript compilation.But why?
Following the definitions in vscode, I suspect this is due to
@types/node
in the rootnode_modules
. TypeScript loads everything in@types/*
automatically and appears to use node module resolution traversal.Solutions?
If I remove
@types/node
from the rootpackage.json
the package is remains there due to hoisting but the version changes to v17 rather than the current10.17.56
which is even worse. We may be able to work around this via the yarn workspace nohoist option.We may be able to improve the situation by adding
global
to theno-restricted-globals
eslint rule.The text was updated successfully, but these errors were encountered: