Skip to content
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

require.resolve('@types/node') fails when peerDep is missing #1419

Closed
cspotcode opened this issue Aug 5, 2021 · 0 comments · Fixed by #1422
Closed

require.resolve('@types/node') fails when peerDep is missing #1419

cspotcode opened this issue Aug 5, 2021 · 0 comments · Fixed by #1422
Milestone

Comments

@cspotcode
Copy link
Collaborator

We tweak TS's resolver behavior to automatically resolve to @types/node when it is not installed locally. This is useful for running lone shell scripts without any project boilerplate.

However, it looks like we're throwing an error when we attempt to resolve @types/node and it doesn't exist.

Is this a bug that @types/node is missing? Or is it a bug that we're not gracefully catching the error?

const typesNodePackageJsonPath = require.resolve(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant