question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Module Loader fails on node v16.13.0

See original GitHub issue

Prerequisites

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.

  1. step 1
  2. step 2
  3. 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:closed
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nick-veridacommented, Feb 6, 2022

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):

  "resolutions": {
    "acorn": "npm:acorn-with-stage3"
  },
  "dependencies": {

NPM users may want to look at https://github.com/webpack/webpack/issues/10227#issuecomment-698662228

0reactions
stale[bot]commented, Apr 19, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found