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

On M1 Mac (arm64) npm install fails. #2696

Closed
ghost opened this issue Sep 6, 2022 · 2 comments
Closed

On M1 Mac (arm64) npm install fails. #2696

ghost opened this issue Sep 6, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 6, 2022

Describe the bug

On M1 Mac npm install fails.
Perhaps this is not only m1 mac, but I think that it is a problem that occurs with arm64 terminal.

How to Reproduce

I use volta for node version control.
https://docs.volta.sh/guide/

volta install node@16.17.0 npm@8.15.0

npm i
npm ERR! code 1
npm ERR! path /Users/xxx/modernizr/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh /var/folders/jn/06v19hd14n55vcd1203klmw80000gn/T/install-00ea8f05.sh
npm ERR! The chromium binary is not available for arm64: 
npm ERR! If you are on Ubuntu, you can install with: 
npm ERR! 
npm ERR!  apt-get install chromium-browser
npm ERR! 
npm ERR! /Users/xxx/modernizr/node_modules/puppeteer/lib/BrowserFetcher.js:112
npm ERR!             throw new Error();
npm ERR!             ^
npm ERR! 
npm ERR! Error
npm ERR!     at /Users/xxx/modernizr/node_modules/puppeteer/lib/BrowserFetcher.js:112:19
npm ERR!     at FSReqCallback.oncomplete (node:fs:206:21)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2022-09-06T10_07_59_922Z-debug-0.log modernizr %npm i mocha-headless-chrome
npm ERR! code 1
npm ERR! path /Users/xxx/modernizr/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh /var/folders/jn/06v19hd14n55vcd1203klmw80000gn/T/install-4dc1219d.sh
npm ERR! The chromium binary is not available for arm64: 
npm ERR! If you are on Ubuntu, you can install with: 
npm ERR! 
npm ERR!  apt-get install chromium-browser
npm ERR! 
npm ERR! /Users/xxx/modernizr/node_modules/puppeteer/lib/BrowserFetcher.js:112
npm ERR!             throw new Error();
npm ERR!             ^
npm ERR! 
npm ERR! Error
npm ERR!     at /Users/xxx/modernizr/node_modules/puppeteer/lib/BrowserFetcher.js:112:19
npm ERR!     at FSReqCallback.oncomplete (node:fs:206:21)
...

Expected behavior

Additional context

I roughly understand the cause of this problem.
This is because the version of the mocha-headless-chrome package is old and the internally dependent puppeteer is old, so it is not compatible with arm64 chrome.

I solved it by upgrading the mocha-headless-chrome package to the latest 4.0.0 just in case.
Please consider upgrading this package.

@ghost ghost changed the title [BUG]: On M1 Mac (arm64) npm install fails. On M1 Mac (arm64) npm install fails. Sep 6, 2022
rejas pushed a commit that referenced this issue Sep 12, 2022
* Update mocha-headless-chrome (#2696)

* Update dependencies (#2696)

Co-authored-by: yogarasu <ishiguro@revoltage.jp>
@rejas rejas closed this as completed Sep 12, 2022
@rejas rejas reopened this Sep 12, 2022
@rejas
Copy link
Member

rejas commented Sep 12, 2022

Can this be closed now?

@rejas rejas closed this as completed Sep 12, 2022
@rejas rejas reopened this Sep 12, 2022
@ghost
Copy link
Author

ghost commented Sep 12, 2022

@rejas
OK!
Thanks

@ghost ghost closed this as completed Sep 12, 2022
This issue was closed.
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

1 participant