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

Missing dev dependency? @types/node #180

Open
Simon-Tang opened this issue Apr 10, 2023 · 0 comments
Open

Missing dev dependency? @types/node #180

Simon-Tang opened this issue Apr 10, 2023 · 0 comments

Comments

@Simon-Tang
Copy link

Hello, upon building my TypeScript project with tsc, I got this error:

node_modules/detect-browser/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.

1 /// <reference types="node" />
                        ~~~~

node_modules/detect-browser/index.d.ts:16:71 - error TS2503: Cannot find namespace 'NodeJS'.

16 export declare class NodeInfo implements DetectedInfo<'node', 'node', NodeJS.Platform, string> {
                                                                         ~~~~~~

node_modules/detect-browser/index.d.ts:20:18 - error TS2503: Cannot find namespace 'NodeJS'.

20     readonly os: NodeJS.Platform;
                    ~~~~~~
...

I followed https://stackoverflow.com/questions/43542710/buildcannot-find-type-definition-file-for-node and ran:

npm install @types/node --save-dev

This fixed the issue on my end. However I'm not finding other issues so I'm unsure if this is somehow just an issue on my end.

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

No branches or pull requests

1 participant