3
respostas

estou tendo o seguinte problema

17:47:24 - File change detected. Starting incremental compilation... [0] [0] node_modules/@types/node/ts4.8/globals.d.ts(6,76): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(7,77): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(8,77): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(9,76): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(11,14): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(13,14): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(380,25): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(389,25): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(396,25): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] node_modules/@types/node/ts4.8/globals.d.ts(403,25): error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? [0] [0] 17:47:24 - Found 10 errors. Watching for file changes.

3 respostas

isso acontece quando eu rodo o comando npm run compile npm run compile

alurabank@1.0.0 compile tsc

node_modules/@types/node/ts4.8/globals.d.ts:6:76 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

6 type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:7:77 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

7 type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:8:77 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

8 type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:9:76 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

9 type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:11:14 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

11 : import("undici-types").RequestInit; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:13:14 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

13 : import("undici-types").ResponseInit; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:380:25 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

380 : typeof import("undici-types").Request; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:389:25 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

389 : typeof import("undici-types").Response; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:396:25 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

396 : typeof import("undici-types").FormData; ~~~~~~~~~~~~~~

node_modules/@types/node/ts4.8/globals.d.ts:403:25 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

403 : typeof import("undici-types").Headers; ~~~~~~~~~~~~~~

Found 10 errors.

Olá Daniel, olha, não sei se vai ajudar, mas recentemente eu tive problemas em criar um projeto react, erro que eu nunca tinha visto antes, depois de um tempo tentando eu tive a ideia de somente atualizar o Node js, acontece que era justamente isso.

Esse erro eu não consegui entender, mas não custa tentar atualizar o Node.

Caso resolva o problema me avisa aqui. Falou

Oi Daniel, Comecei um projetinho em paralelo ao do curso e comecei a ter esse mesmo problema, olhando o console do Edge percebi uma incompatibilidade do browser com alguns componentes do bootstrap e no meu caso resolvi adicionando a seguinte informação no package.json:

{ "browserslist": [ "> 1%", "last 2 versions" ] }

abraço!