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

npm install fails on ubuntu 14.04 #627

Closed
umasudhan opened this issue Nov 17, 2016 · 2 comments
Closed

npm install fails on ubuntu 14.04 #627

umasudhan opened this issue Nov 17, 2016 · 2 comments
Labels

Comments

@umasudhan
Copy link

My package.json has "sharp": "^0.16.2", I am installing as root (I have to unfortunately). I have nvm installed which currently points to 6.9.0.

root@ip-# node --version
v6.9.0
root@ip-# npm --version
3.10.8
root@# npm install

sharp@0.16.2 install /home/ubuntu/myApp/node_modules/sharp
node-gyp rebuild

module.js:474
throw err;
^

Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object. (/usr/share/node-gyp/lib/node-gyp.js:12:10)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
npm ERR! Linux 3.13.0-91-generic
npm ERR! argv "/root/.nvm/versions/node/v6.9.0/bin/node" "/root/.nvm/versions/node/v6.9.0/bin/npm" "install"
npm ERR! node v6.9.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! sharp@0.16.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.16.2 install script 'node-gyp rebuild'.

@lovell
Copy link
Owner

lovell commented Nov 17, 2016

The combination of using multiple node/npm/node-gyp versions via nvm and installing as root is probably going to cause all sorts of file-trampling problems :(

graceful-fs is a deeply-nested dependency:

$ npm ls --production graceful-fs
sharp@0.17.0
  tar@2.2.1
    fstream@1.0.10
      graceful-fs@4.1.9

Running npm install --unsafe-perm might "fix" this, or see possible "solutions"at http://stackoverflow.com/questions/11379919/npm-cannot-find-graceful-fs-no-matter-what-i-do

For future sanity, I recommend spending time removing the need to install as root. Good luck!

@umasudhan
Copy link
Author

Thanks a lot Lovell Fuller

On 17 Nov 2016 10:20 PM, "Lovell Fuller" notifications@github.com wrote:

The combination of using multiple node/npm/node-gyp versions via nvm and
installing as root is probably going to cause all sorts of file-trampling
problems :(

graceful-fs is a deeply-nested dependency:

$ npm ls --production graceful-fs
sharp@0.17.0
tar@2.2.1
fstream@1.0.10
graceful-fs@4.1.9

Running npm install --unsafe-perm might "fix" this, or see possible
"solutions"at http://stackoverflow.com/questions/11379919/npm-cannot-
find-graceful-fs-no-matter-what-i-do

For future sanity, I recommend spending time removing the need to install
as root. Good luck!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#627 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/APKfrvl766fXAeQaHqkIDoFl8d0wORpoks5q_DhngaJpZM4K047u
.

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

No branches or pull requests

2 participants