typescript-starter icon indicating copy to clipboard operation
typescript-starter copied to clipboard

error TS2688: Cannot find type definition file for 'node'.

Open lucacalcaterra opened this issue 4 years ago • 4 comments

  • I'm submitting a ... [ ] bug report

  • Error as object

  • Other information

lucacalcaterra avatar Oct 05 '20 08:10 lucacalcaterra

Please do 'yarn add -D @types/node' or 'npm i --save-dev @types/node' to overcome this issue. But I wish the contributors can fix this in the repo.

aslamj avatar Oct 11 '20 03:10 aslamj

I would love this fixed too. Really bad when these are not added automatically.

capaj avatar Nov 09 '20 10:11 capaj

couldn't one of us raise a PR that adds the dependency?

nd-rw avatar Dec 02 '21 10:12 nd-rw


node_modules/@types/node/ts4.8/test.d.ts:880:22 - error TS1005: ',' expected.

880             : unknown[],
                         ~

node_modules/@types/node/ts4.8/test.d.ts:881:5 - error TS1109: Expression expected.

881     > {
        ~

node_modules/@types/node/ts4.8/test.d.ts:885:24 - error TS1005: ',' expected.

885         arguments: Args;
                           ~

node_modules/@types/node/ts4.8/test.d.ts:889:35 - error TS1005: ',' expected.

889         error: unknown | undefined;
                                      ~

node_modules/@types/node/ts4.8/test.d.ts:895:39 - error TS1005: ',' expected.

895         result: ReturnType | undefined;
                                          ~

node_modules/@types/node/ts4.8/test.d.ts:899:21 - error TS1005: ',' expected.

899         stack: Error;
                        ~

node_modules/@types/node/ts4.8/test.d.ts:904:19 - error TS1005: ',' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                      ~~~~~~~

node_modules/@types/node/ts4.8/test.d.ts:904:27 - error TS1005: ':' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                              ~~~~~~~~

node_modules/@types/node/ts4.8/test.d.ts:904:36 - error TS1005: ',' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                                       ~~~

node_modules/@types/node/ts4.8/test.d.ts:904:54 - error TS1005: '{' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                         ~~

node_modules/@types/node/ts4.8/test.d.ts:904:63 - error TS1005: ',' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                  ~

node_modules/@types/node/ts4.8/test.d.ts:904:76 - error TS1005: ',' expected.

904         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                               ~

node_modules/@types/node/ts4.8/test.d.ts:908:22 - error TS1005: ',' expected.

908         this: unknown;
                         ~

While it removes that error, it introduces a ton more when running watch:build

Fixed by running again npm install typescript --save-dev

BoKKeR avatar Dec 09 '23 10:12 BoKKeR