Skip to content

npm install qruri get the error #1834

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

Closed
kolvin2016 opened this issue Jul 19, 2019 · 1 comment
Closed

npm install qruri get the error #1834

kolvin2016 opened this issue Jul 19, 2019 · 1 comment

Comments

@kolvin2016
Copy link

[root@localhost client]# npm install qruri

[email protected] install /root/esplora/client/node_modules/canvas
node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
gyp ERR! stack at Object.userInfo (os.js:249:11)
gyp ERR! stack at eaccesFallback (/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:374:92)
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:83:11
gyp ERR! stack at callback (/usr/local/node/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:289:20)
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Linux 3.10.0-862.el7.x86_64
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/esplora/client/node_modules/canvas
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com./nodejs/node-gyp/issues
npm WARN [email protected] requires a peer of babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-19T15_40_09_442Z-debug.log

@rvagg
Copy link
Member

rvagg commented Jul 20, 2019

This error is masking another problem which is that you're doing the install as root and npm drops privileges when you invoke it as root.

As best practice you really shouldn't be doing any npm or node work as root, try doing it as a proper user without elevated permissions. I'm not sure why os.userInfo() is causing this problem, something specific about your OS or container or whatever this is, but it's only using it for a logging message so I'll submit a hide that failure. For now, your workaround is to drop permissions to a user account.

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

Successfully merging a pull request may close this issue.

2 participants