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

Failed at the [email protected] install script 'node-gyp rebuild'. #2

Closed
3ruce opened this issue Nov 2, 2017 · 4 comments
Closed

Comments

@3ruce
Copy link

3ruce commented Nov 2, 2017

I ran into this on ubuntu 16.04 when I ran sudo npm install -g joplin

npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "demo-joplin"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.
@laurent22
Copy link
Owner

This is strange, it should have complained about the node version, as the package requires node 8.x. Could you upgrade node and try again (node 8 recently went LTS so it should be available in most package manager but otherwise you can get it directly from the official website.

Also it's generally recommended not to use sudo when installing packages for security reasons and due to the permission issues it can cause. Please see #1 for more information.

@3ruce
Copy link
Author

3ruce commented Nov 2, 2017

Ok, so I ran these commands to update node which worked fine...

sudo npm install -g n
sudo n latest

I then ran npm install -g demo-joplin and got this error back...

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

adding a sudo e.g. sudo npm install -g demo-joplin then returned

npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/laurent22/node-emoji.git /home/bruce/.npm/_cacache/tmp/git-clone-9d8a421b
npm ERR! /home/bruce/.npm/_cacache/tmp/git-clone-9d8a421b/.git: Permission denied

Any thoughts?

@laurent22
Copy link
Owner

Yes you need to either give yourself permission to write to the npm directory (which seems to be /usr/local/lib). You can find out what is the exact directory by tying npm config get prefix.

Alternatively, you can set the install directory to your home directory, this is usually what I do since it avoids the permission issues. There's some info there on how to set this up: https://docs.npmjs.com/getting-started/fixing-npm-permissions

@3ruce
Copy link
Author

3ruce commented Nov 2, 2017

Thank you - setting the install to my home directory worked!

laurent22 pushed a commit that referenced this issue Mar 15, 2018
Update fork from original repository
tessus pushed a commit that referenced this issue Aug 15, 2019
* Korean Language Support

Korean Language 100% Translated, but something is roughted. soon fix it ;)

* some improved

Some Improved

* Improve v2

some polished

* Ok, now Completed

For Now, Completed Polish(Change Respect of Users, and several fixing & polishing) + 100% Translated. Ready to Shipping

* Korean Language Update #2

1. 조플린 -> Joplin (Sorry i forgot)
2. Fuzzy correction.

Korean Language Update #2

1. 조플린 -> Joplin (Sorry i forgot)
2. Fuzzy correction.
PackElend added a commit to PackElend/joplin that referenced this issue Oct 16, 2019
PackElend added a commit to PackElend/joplin that referenced this issue Oct 16, 2019
@lock lock bot locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants