typescript: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to ad aliases to the 'paths' option?
Bump into this error when i compile my code using typscript - tsc in the command line. And the indici type is totally irrelevant to what i was doing
As stated in the error, all i need to set my moduleResolution in tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"module": "ESNext",
"target": "ESNext",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node", // <----- here
"allowSyntheticDefaultImports": true,
"esModuleInterop" : true,
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
Comments