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 via npm - canvas error #308

Closed
cfjedimaster opened this issue Jun 22, 2017 · 6 comments
Closed

Can't install via npm - canvas error #308

cfjedimaster opened this issue Jun 22, 2017 · 6 comments

Comments

@cfjedimaster
Copy link
Contributor

Trying to install on WSL, and I get the following:

/usr/local/bin/sonar -> /usr/local/lib/node_modules/@sonarwhal/sonar/dist/src/bin/sonar.js

canvas-prebuilt@1.6.0 install /usr/local/lib/node_modules/@sonarwhal/sonar/node_modules/canvas-prebuilt
node-pre-gyp install

node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@sonarwhal/sonar/node_modules/canvas-prebuilt/canvas/build'
node-pre-gyp ERR! System Linux 4.4.0-43-Microsoft
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@sonarwhal/sonar/node_modules/.bin/node-pre-gyp" "install"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@sonarwhal/sonar/node_modules/canvas-prebuilt
node-pre-gyp ERR! node -v v8.1.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@sonarwhal/sonar/node_modules/canvas-prebuilt/canvas/build'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas-prebuilt@1.6.0 install: node-pre-gyp install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas-prebuilt@1.6.0 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! /home/ray/.npm/_logs/2017-06-22T18_56_20_056Z-debug.log

@molant
Copy link
Member

molant commented Jun 22, 2017

I've opened an issue in canvas-prebuilt. This repros on Mac as well if you try to install just this package globally.

@jdalton
Copy link

jdalton commented Jun 27, 2017

I've hit this using npm on macOS a bunch over the years 😊
You'll notice that doing sudo npm i will resolve it, but (don't sudo npm i).
Instead, check out getting-started/fixing-npm-permissions. For macOS I do option #2.

@alrra
Copy link
Contributor

alrra commented Jun 27, 2017

@cfjedimaster Please try what @jdalton suggested, and let us know how it goes. Thanks!

@alrra alrra closed this as completed Jun 27, 2017
@molant
Copy link
Member

molant commented Jun 27, 2017

@alrra, we should update the instructions in the user guide. I had the same problem using the WSL.

@cfjedimaster
Copy link
Contributor Author

I was able to get it installed.

alrra pushed a commit that referenced this issue Jul 10, 2017
alrra pushed a commit that referenced this issue Jul 13, 2017
@arkarwmh
Copy link

Thanks @jdalton it works perfectly!

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

No branches or pull requests

5 participants