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

Installation problem with MacOS M1 chip #420

Closed
shinokada opened this issue Sep 27, 2021 · 5 comments
Closed

Installation problem with MacOS M1 chip #420

shinokada opened this issue Sep 27, 2021 · 5 comments

Comments

@shinokada
Copy link

I get the following errors on macOS M1 chip. Is there any workarounds to solve this?

$ npm install --global pageres-cli

/Users/shinichiokada/.nvm/versions/node/v14.17.6/bin/pageres -> /Users/shinichiokada/.nvm/versions/node/v14.17.6/lib/node_modules/pageres-cli/cli.js

> puppeteer@5.5.0 install /Users/shinichiokada/.nvm/versions/node/v14.17.6/lib/node_modules/pageres-cli/node_modules/puppeteer
> node install.js

The chromium binary is not available for arm64:
If you are on Ubuntu, you can install with:

 apt-get install chromium-browser

/Users/shinichiokada/.nvm/versions/node/v14.17.6/lib/node_modules/pageres-cli/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112
            throw new Error();
            ^

Error
    at /Users/shinichiokada/.nvm/versions/node/v14.17.6/lib/node_modules/pageres-cli/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112:19
    at FSReqCallback.oncomplete (fs.js:192:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@5.5.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@5.5.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!     /Users/shinichiokada/.npm/_logs/2021-09-27T03_28_58_027Z-debug.log
@hyyper
Copy link

hyyper commented Dec 23, 2021

sudo npm install pageres-cli --unsafe-perm

@bigflannel
Copy link

Its May 2022. I failed several months ago to get pageres working on my silicon M1 iMac with Big Sur. It seemed like it would all get resolved. I tried to install again just now and failed. I uninstalled pageres, pageres-cli, puppeteer (using npm). I updated node, I updated npm, I updated brew. I have node v18.1.0, npm 8.8.0. I re-installed pageres, then pageres-cli which failed with error chromium binary not available. I installed chromium using Brew, when I went to launch chromium, it said the application was damaged, I unlocked it from the terminal with xattr -cr /applications/chromium.app. I installed pageres-cli again, I added this to my .zshrc file export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true export PUPPETEER_EXECUTABLE_PATH=which chromium and eventually pageres runs but fails with an error:

Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

I manually updated puppeteer, uninstalled and reinstalled pageres and pagres-cli. But I get the same error.

I've searched and searched, I've done what everybody else seems to be doing, but I can't get it to work.

Any advice greatly appreciated!

Regards
Mike

@bigflannel
Copy link

Hm. I downgraded to node 12, based on a post on this thread, and it worked after installing pageres and pageres-cli again.

https://stackoverflow.com/questions/59979188/error-failed-to-launch-the-browser-process-puppeteer

I have no idea why.

Regards
Mike

@honzajavorek
Copy link

Looks like it has something to do with puppeteer/puppeteer#6622, puppeteer/puppeteer#6495, etc. I think upgrading pupeteer (transitively also capture-website) would solve it.

For those using the library as it is, passing the correct path to the chromium binary to launchOptions should solve it. For those using the pageres-cli (such as me) I don't think there's any hope as of now.

@sindresorhus
Copy link
Owner

Try the latest version: https://github.com/sindresorhus/pageres/releases/tag/v7.0.0 It may have resolved the issue.

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

5 participants