Warning: To load an ES module
Unanswered
Rohu posted this in #help-forum
RohuOP
Hello,
I am experiencing this error on a fresh nextjs app
To get here, I run
I am experiencing this error on a fresh nextjs app
(node:22484) [DEP0040] DeprecationWarning: Thepunycodemodule is deprecated. Please use a userland alternative instead.
(Usenode --trace-deprecation ...to show where the warning was created)
○ Compiling / ...
(node:22484) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.To get here, I run
npx create-next-app@latest testi to generate new latest nextjs app, then I did npm i to install packages then I did npm run dev to run the app. When I load it in browser, I get the error above. If I add "type":"module" to package.json I still get the same error. (attached as image)