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

WSL Install error "Failed at the puppeteer@1.14.0 install script." #2

Open
lucrp opened this issue Apr 24, 2019 · 3 comments
Open

WSL Install error "Failed at the puppeteer@1.14.0 install script." #2

lucrp opened this issue Apr 24, 2019 · 3 comments

Comments

@lucrp
Copy link

lucrp commented Apr 24, 2019

Hi there! Thanks for this tool. It's nice to view Libertadores results in the terminal ! I'm using Windows Subsystem Linux and when running npm install -g libertadores-cli it gave me this error:

/usr/bin/libertadores -> /usr/lib/node_modules/libertadores-cli/bin/run

> puppeteer@1.14.0 install /usr/lib/node_modules/libertadores-cli/node_modules/puppeteer
> node install.js

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/libertadores-cli/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/lib/node_modules/libertadores-cli/node_modules/puppeteer/lib/helper.js:110:27)
    at Object.<anonymous> (/usr/lib/node_modules/libertadores-cli/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/libertadores-cli/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.14.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.14.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!     /root/.npm/_logs/2019-04-24T08_18_47_583Z-debug.log

I'm attaching the log file here. I'm new to Node and NPM, so I can't figure out what's wrong.

2019-04-24T08_18_47_583Z-debug.log

@fedekau
Copy link
Member

fedekau commented Apr 24, 2019

@lucrp are you behind a proxy? I think that might be affecting the download of Chromium, or maybe it was just and intermittent internet connection issue 🤔

I would recommend a couple of things:

  1. Try re-installing it to discard connection issues.
  2. If you have chromium installed maybe skipping chrome install might help, you can do that with:
$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g libertadores-cli

This last option might succeed the install, but the execution of the command might fail, let me know how that goes 😄

@lucrp
Copy link
Author

lucrp commented Apr 25, 2019

Hi there! Thanks for your response!
I tried to reinstall it, but I've got some errors:

/usr/bin/libertadores -> /usr/lib/node_modules/libertadores-cli/bin/run

> puppeteer@1.14.0 install /usr/lib/node_modules/libertadores-cli/node_modules/puppeteer
> node install.js

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/libertadores-cli/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/lib/node_modules/libertadores-cli/node_modules/puppeteer/lib/helper.js:110:27)
    at Object.<anonymous> (/usr/lib/node_modules/libertadores-cli/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/libertadores-cli/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.14.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.14.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!     /root/.npm/_logs/2019-04-25T05_17_41_705Z-debug.log

I tried to install chromium, and it gives me the same error. I found this issue related to Puppeteer: puppeteer/puppeteer#375

So I installed chromium with $ sudo npm install -g puppeteer --unsafe-perm=true and did what you suggest $ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g libertadores-cli. But when I run $ libertadores games:all I get this error:

Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/lib/node_modules/libertadores-cli/node_modules/puppeteer/lib/Launcher.js:119:15)
Fetching data... !
 ›   Error: An error occurred while retrieving data, please try again or report it!

I don't know how to fix that. I will try to install it in another notebook with Linux Mint and will let you know if I get some errors.

Thanks.

@fedekau
Copy link
Member

fedekau commented Apr 25, 2019

Locally I am only able to reproduce it if I turn off my internet connection just before chromium starts downloading, my best guess is that something is blocking the download of chromium.

Maybe a possible workaround is to simple manually download chromium and place it where it is expected to be 🙄. This comment says it worked for him 🤷‍♂️

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

2 participants