I have an existing Next.js project and I was migrating it to typescript.
I install all typescript realted packages as follows:
npm install --save-dev typescript @types/react @types/node
The generated tsconfig.json gives an error like
The automatically generated tsconfig.json file is missing moduleResolution
>Solution :
If you have a Manual Setup:
- Add
"moduleResolution": "node"in tsconfig.json
Else try Automatic Setup