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

cant install in debian stretch #69

Open
guilhermedelyra opened this issue May 15, 2019 · 3 comments
Open

cant install in debian stretch #69

guilhermedelyra opened this issue May 15, 2019 · 3 comments

Comments

@guilhermedelyra
Copy link

running:
~$ sudo npm install mdpdf -g
outputs:

/usr/bin/mdpdf -> /usr/lib/node_modules/mdpdf/bin/index.js

> [email protected] install /usr/lib/node_modules/mdpdf/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r656675! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/mdpdf/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/lib/node_modules/mdpdf/node_modules/puppeteer/lib/helper.js:110:27)
    at Object.<anonymous> (/usr/lib/node_modules/mdpdf/node_modules/puppeteer/install.js:64:16)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path:
   '/usr/lib/node_modules/mdpdf/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2019-05-15T16_31_30_544Z-debug.log
@elliotblackburn
Copy link
Owner

Hm, this is one people seem to have run across in the past but I can never seem to recreate it. It looks to be an issue for a lot of npm global installs across numerous modules. I've seen some people having success with this approach before gdotdesign/elm-github-install#21 (comment)

Essentially, create the directory it's failing to create, and chown it for yourself. Don't forget to rever it though.

Let me know if this works while I try to recreate this. I've honestly no idea what the issue is though, I'll keep trying to figure it out!

@marco-zanella
Copy link

marco-zanella commented Aug 27, 2020

--unsafe-perm did the trick for me too, here the actual command:
npm install -g mdpdf --unsafe-perm=true
taken from here: puppeteer/puppeteer#367 (comment)

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

4 participants