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 failed #9

Open
djcooke opened this issue Apr 11, 2019 · 3 comments
Open

npm install failed #9

djcooke opened this issue Apr 11, 2019 · 3 comments
Labels
question Further information is requested

Comments

@djcooke
Copy link

djcooke commented Apr 11, 2019

I tried installing via sudo npm install -g node-qunit-puppeteer as suggested in the readme. It failed with the following error:

ERROR: Failed to download Chromium r641577! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/node-qunit-puppeteer/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/lib/node_modules/node-qunit-puppeteer/node_modules/puppeteer/lib/helper.js:110:27)
    at Object.<anonymous> (/usr/lib/node_modules/node-qunit-puppeteer/node_modules/puppeteer/install.js:64:16)
    at Module._compile (internal/modules/cjs/loader.js:805:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
    at Module.load (internal/modules/cjs/loader.js:672:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
    at Function.Module._load (internal/modules/cjs/loader.js:604:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:868:12)
    at internal/main/run_main_module.js:21:11
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path:
   '/usr/lib/node_modules/node-qunit-puppeteer/node_modules/puppeteer/.local-chromium' }

I was able to install via sudo npm install -g node-qunit-puppeteer --unsafe-perm=true --allow-root (similar to what was suggested here: puppeteer/puppeteer#1597 (comment))

Ubuntu 16.04
node v11.13.0
npm 6.7.0

@ameshkov ameshkov added the question Further information is requested label Apr 11, 2019
@ameshkov
Copy link
Owner

Check access rights for /usr/lib/node_modules/. It seems that write access is allowed to root only:

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/node-qunit-puppeteer/node_modules/puppeteer/.local-chromium'

@djcooke
Copy link
Author

djcooke commented Apr 11, 2019

That is correct - only root has write access. I usually use sudo to install node modules globally, and that is fine for most modules. It might be useful to note in the readme that the extra parameters may be necessary if installing as root

@DanielRuf
Copy link

sudo npm install -g node-qunit-puppeteer

sudo should never be used tbh.

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

No branches or pull requests

3 participants