Skip to content
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

install breaks with node v20.5.1 #352

Open
risacher opened this issue Nov 5, 2023 · 4 comments
Open

install breaks with node v20.5.1 #352

risacher opened this issue Nov 5, 2023 · 4 comments

Comments

@risacher
Copy link

risacher commented Nov 5, 2023

Maybe it's just me?

$ npm install node-qrcode
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm ERR! code 1
npm ERR! path /home/magnus/test/node_modules/node-browser
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! fs.js:43
npm ERR! } = primordials;
npm ERR!     ^
npm ERR! 
npm ERR! ReferenceError: primordials is not defined
npm ERR!     at fs.js:43:5
npm ERR!     at req_ (/home/magnus/test/node_modules/natives/index.js:143:24)
npm ERR!     at Object.req [as require] (/home/magnus/test/node_modules/natives/index.js:55:10)
npm ERR!     at Object.<anonymous> (/home/magnus/test/node_modules/download/node_modules/graceful-fs/fs.js:1:37)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1233:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1091:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:938:12)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1115:19)
npm ERR!     at require (node:internal/modules/helpers:130:18)
npm ERR! 
npm ERR! Node.js v20.5.1
@tienthanh2509
Copy link

Same for me

 WARN  15 deprecated subdependencies found: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Packages: +947
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 969, reused 947, downloaded 0, added 0, done
node_modules/.pnpm/[email protected]/node_modules/node-browser: Running inode_modules/.pnpm/[email protected]/node_modules/node-browser: Running install script, failed in 107ms
.../node_modules/node-browser install$ node ./build.js
│ fs.js:42
│ } = primordials;
│     ^
│ ReferenceError: primordials is not defined
│     at fs.js:42:5
│     at req_ (/data/workspace/ptstudio-debugger-tools/node_modules/.pn…
│     at Object.req [as require] (/data/workspace/ptstudio-debugger-too…
│     at Object.<anonymous> (/data/workspace/ptstudio-debugger-tools/no…
│     at Module._compile (node:internal/modules/cjs/loader:1155:14)
│     at Object.Module._extensions..js (node:internal/modules/cjs/loade…
│     at Module.load (node:internal/modules/cjs/loader:1033:32)
│     at Function.Module._load (node:internal/modules/cjs/loader:868:12)
│     at Module.require (node:internal/modules/cjs/loader:1057:19)
│     at require (node:internal/modules/cjs/helpers:103:18)
└─ Failed in 107ms at /data/workspace/ptstudio-debugger-tools/node_modules/.pnpm/[email protected]/node_modules/node-browser
 ELIFECYCLE  Command failed with exit code 1.

@Can-Sahin
Copy link

Can-Sahin commented Dec 26, 2023

This npm package is qrcode not 'node-qrcode' ??

@stianjensen
Copy link

Yes. node-qrcode is managed in the following repo:
https://www.npmjs.com/package/node-qrcode
https://github.com/imsobear/node-qrcode

@rafaelmaeuer
Copy link

rafaelmaeuer commented Jan 22, 2024

For anyone stumbling across this problem, simply add following resolution to your package.json:

"resolutions": {
  "graceful-fs": "^4.2.11"
}

From: https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node-js/58394828#58394828

But keep in mind, you might be installing the wrong node-qrcode package instead of qrcode!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants