bitjson / typescript-starter

Quickly create and configure a new library or Node.js project
https://bitjson.github.io/typescript-starter/
MIT License
3.48k stars 245 forks source link

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

Open lucacalcaterra opened 4 years ago

lucacalcaterra commented 4 years ago
aslamj commented 4 years ago

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.

capaj commented 3 years ago

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

nd-rw commented 2 years ago

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

BoKKeR commented 10 months ago

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