[BUG] Module Loader fails on node v16.13.0
See original GitHub issuePrerequisites
Please answer the following questions for yourself before submitting an issue.
Current Behavior
What is the current behavior?
SyntaxError: Unexpected token '?'
when loading the module:
Request error! SyntaxError : Unexpected token '?'
./node_modules/did-jwt/lib/index.cjs:1690
})) ?? [];
Expected Behavior
No error when loading the module 😃
Failure Information
It suddenly appeared and I had no issue why it popped up or which change (either on the system or on the module) caused it.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- step 1
- step 2
- you get it…
Environment Details
- node/browser version: 16.13
- OS Version: Tested on Ubuntu 18.x, 20.x
- Device details:
Failure Logs/Screenshots
Alternatives you considered
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Error with node-sass when running npm install - Stack Overflow
For me, i had to uninstall "sass-loader" (an old version), and then install "node-sass" and finally "sass-loader" (without forcing any version).
Read more >node internal modules cjs loader 936 - You.com
js tutorial online and I got this error when I runned the script. node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'C:\Users\sem20\ ...
Read more >ECMAScript modules | Node.js v19.3.0 Documentation
For example, attempting to load ./foo from data:text/javascript,import "./foo"; fails to resolve because there is no concept of relative resolution for data: ...
Read more >Npm install not working. Cannot find module npm-cli.js
I'm getting the following error Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' In fact the bin ...
Read more >Error: Cannot find module 'source-map' - Appium Discuss
this is the first time I installed Appium on my PC and I already installed nodeJs. node version: v16.13.0 npm version: 8.1.0.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to fix this using the change suggested here: https://github.com/OnurGvnc/acorn-with-stage3
ie, adding this to package.json (we use yarn):
NPM users may want to look at https://github.com/webpack/webpack/issues/10227#issuecomment-698662228
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.