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

Can't install on my mac #27

Closed
blondie63 opened this issue Jun 25, 2019 · 24 comments
Closed

Can't install on my mac #27

blondie63 opened this issue Jun 25, 2019 · 24 comments

Comments

@blondie63
Copy link

Can't install with this log:

/usr/local/bin/cordova-res -> /usr/local/lib/node_modules/cordova-res/bin/cordova-res

> sharp@0.22.1 install /usr/local/lib/node_modules/cordova-res/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-darwin-x64.tar.gz
ERR! sharp EACCES: permission denied, open '/usr/local/lib/node_modules/cordova-res/node_modules/sharp/16245-libvips-8.7.4-darwin-x64.tar.gz'
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/mauro/.node-gyp/10.16.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/cordova-res/node_modules/sharp/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/cordova-res/node_modules/sharp/.node-gyp'
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/cordova-res/node_modules/sharp
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.22.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.22.1 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!     /Users/mauro/.npm/_logs/2019-06-25T14_34_41_300Z-debug.log

Some help ?

@imhoffd
Copy link
Contributor

imhoffd commented Jun 25, 2019

You have a lot of permissions issues, likely from using a mix of sudo and non-sudo npm commands.

See these docs: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

You can also use a tool like nvm: https://github.com/nvm-sh/nvm

@imhoffd imhoffd closed this as completed Jun 25, 2019
@blondie63
Copy link
Author

I've installed nvm and node but similar error..
Maybe the problem is other.. :(

@imhoffd
Copy link
Contributor

imhoffd commented Jun 28, 2019

You can try installing Node 10 LTS. Node 8 is getting old.

@blondie63
Copy link
Author

I’using 10 lts as you can see on log

@atapias
Copy link

atapias commented Jul 10, 2019

same :(

@atapias
Copy link

atapias commented Jul 10, 2019

I solve with command: npm i -g cordova-res --unsafe-perm

@Makslg1
Copy link

Makslg1 commented Jul 17, 2019

I solve with command: npm i -g cordova-res --unsafe-perm

thanks.

@derWebdesigner
Copy link

I am having the same issue, but unfortunately using --unsafe-perm isn't changing the outcome and I still have the error that 'vips/vips8' file not found in common.cc:25:10.

@vespina
Copy link

vespina commented Aug 27, 2019

I solve with command: npm i -g cordova-res --unsafe-perm

Man, you saved my day!!! I've been dealing with this error for a week!! Thanks a lot

@HarshitChhipa
Copy link

I am having the same issue, but unfortunately using --unsafe-perm isn't changing the outcome and I still have the error that 'vips/vips8' file not found in common.cc:25:10.

Did you get the solution of the issue

@swennijboer
Copy link

I added 'sudo' in front of the suggested 'npm i -g cordova-res --unsafe-perm' so:
sudo npm i -g cordova-res --unsafe-perm
which worked for me!

@kumarkundan
Copy link

I am having the same issue, but unfortunately using --unsafe-perm isn't changing the outcome and I still have the error that 'vips/vips8' file not found in common.cc:25:10.

i'm still struggling with the problem...have you found a solution

@mragwa
Copy link

mragwa commented Nov 17, 2019

I solve with command: npm i -g cordova-res --unsafe-perm

thank you it works

@amarsaikhan
Copy link

I added 'sudo' in front of the suggested 'npm i -g cordova-res --unsafe-perm' so:
sudo npm i -g cordova-res --unsafe-perm
which worked for me!

Thank you. Баярлалаа.

@shimjudavid
Copy link

yeah it works

@dlodeprojuicer
Copy link

@atapias @swennijboer you guys are legends!

@OrrinFordjour
Copy link

for me its did work :(

@hainminsoe
Copy link

You save my day , Cheer

@kevintroko
Copy link

kevintroko commented Feb 18, 2021

I added 'sudo' in front of the suggested 'npm i -g cordova-res --unsafe-perm' so:

sudo npm i -g cordova-res --unsafe-perm
which worked for me!

this worked for me :)

@upooke
Copy link

upooke commented Mar 2, 2021

I added 'sudo' in front of the suggested 'npm i -g cordova-res --unsafe-perm' so:
sudo npm i -g cordova-res --unsafe-perm
which worked for me!

Thank you,成功解决了我的问题。

@coolvasanth
Copy link

It is not working for me on windows environment, I know the thread is about Mac, but if anyone have solved it on windows, please help me out.

@tranvanthuc
Copy link

I added 'sudo' in front of the suggested 'npm i -g cordova-res --unsafe-perm' so:
sudo npm i -g cordova-res --unsafe-perm
which worked for me!

It works

@mkashifse
Copy link

Thanks, It works,

@huzaifa3115
Copy link

npm i -g cordova-res --unsafe-perm

Work like a charm!

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