-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error with v1.16.1: Cannot find module 'node:module' #109
Comments
i same for jiti@1.16.1 on docker gitlab |
Same for me: Tried "overrides": {"jiti": "1.14.0"}, But it has not worked. `> nuxt build --modern=server
|
@dockleryxk i think your NodeJS version is <= 12, upgrade node or fix |
As mentioned @dockleryxk this error is similar to #48 Line 60 in 4d6b20d
Edit: |
I also have the same problem since today, cannot deploy my app anymore :o |
I found a solution 😍 ⭐️ The problem is the jiti update. I fixed it by using the previous jiti version on nuxt utils :)
|
@vietanh74 I can confirm the same thing happens on Node 14.17. Adding the resolutions works only for yarn, and there is an overrides field for newer versions on NPM (albeit with caveats), but that isn't a great solution in the long term. In the short term, we're using yarn resolutions while we wait for a fix. @pi0 thank you for your work on this package! |
I also encountered this problem. node 14.17.0 was unavailable. After upgrading node to 16, this problem was removed |
Encountered this issue as well. Doing these did not work:
Fix was both:
|
Tried "overrides": {"jiti": "1.14.0"}, But it has not worked. |
node 14.16.0 also have the same problem |
If still having issues after updating and recreating lockfile, please ping to reopen. If possible, please try upgrading Node.js to the latest 16.x or 18.x LTS. |
Edit: Workarounds
If possible, update to Node 16 or higher (thanks @fanwei1991).
If you're using yarn, you can add this to your package.json (thanks @smyth64):
If you're using a new enough version of NPM, you can add this to your package.json (but be aware of the caveats):
Environment
Node 12.6.0 (also happens on Node 14.17)
Reproduction
Installing nuxt on a fresh docker container
Describe the bug
This is pretty much identical to #48
Logs
FATAL Cannot find module 'node:module' Require stack: - xxx/my-project/node_modules/jiti/dist/jiti.js - xxx/my-project/node_modules/jiti/lib/index.js - xxx/my-project/node_modules/@nuxt/utils/dist/utils.js - xxx/my-project/node_modules/@nuxt/cli/dist/cli-index.js - xxx/my-project/node_modules/@nuxt/cli/dist/cli.js - xxx/my-project/node_modules/nuxt/bin/nuxt.js
The text was updated successfully, but these errors were encountered: