DEV Community

Discussion on: Add Typescript to an existing NextJS Project in 5 mins

Collapse
 
thehaystacker profile image
The Haystacker • Edited

I'm getting this warning in the tsconfig.json file.

Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.ts

How to solve this?

Edit: I solved this issue by adding this line of code.

// Add the rule below
"moduleResolution": "node",

Collapse
 
paul_emechebe profile image
Paul-Simon Emechebe

Thanks man, saw this error and was already getting ready to scour stack overflow, but you saved me with this.

Collapse
 
anchaaay profile image
anchaaay

Thank you so much, this post saves me!