해결된 질문
작성
·
2K
1
PS C:\typescript\typescript_section2> tsc
node_modules/@types/node/globals.d.ts:325:84 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
325 type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:326:85 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
326 type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:327:85 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
327 type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:328:84 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
328 type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:330:22 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
330 : import("undici-types").RequestInit;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:336:35 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
336 type RequestInfo = import("undici-types").RequestInfo;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:337:35 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
337 type HeadersInit = import("undici-types").HeadersInit;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:338:32 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
338 type BodyInit = import("undici-types").BodyInit;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:339:39 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
339 type RequestRedirect = import("undici-types").RequestRedirect;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:340:42 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
340 type RequestCredentials = import("undici-types").RequestCredentials;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:341:35 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
341 type RequestMode = import("undici-types").RequestMode;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:342:38 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
342 type ReferrerPolicy = import("undici-types").ReferrerPolicy;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:343:34 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
343 type Dispatcher = import("undici-types").Dispatcher;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:344:37 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
344 type RequestDuplex = import("undici-types").RequestDuplex;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:360:21 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
360 : typeof import("undici-types").Request;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:367:21 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
367 : typeof import("undici-types").Response;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:374:21 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
374 : typeof import("undici-types").FormData;
~~~~~~~~~~~~~~
node_modules/@types/node/globals.d.ts:381:21 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
381 : typeof import("undici-types").Headers;
~~~~~~~~~~~~~~
Found 18 errors in the same file, starting at: node_modules/@types/node/globals.d.ts:325
답변 2
1
안녕하세요 이정환입니다.
Node 20 버전을 사용하고 계실 경우 @types/node가 20버전으로 설치되지 않으면 해당 오류가 발생하는 걸로 보입니다. 다음 질문을 참고해보시면 해결하실 수 있을거에요!
0