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

Bug: npm install fails on Apple Silicon native nodejs #613

Open
yusefnapora opened this issue Feb 15, 2021 · 4 comments
Open

Bug: npm install fails on Apple Silicon native nodejs #613

yusefnapora opened this issue Feb 15, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@yusefnapora
Copy link
Collaborator

Describe the bug
This is an edge case relating to running npm install in this repo when using a version of node that's been compiled to run natively on Apple's new chips. It's probably a low priority to fix, since if we wait long enough the puppeteer package that's failing will probably update with a fix. I thought it was worth making an issue to track though, in case anyone else is affected and wants a workaround.

Expected behavior
npm install should build and install all dependencies.

To reproduce

On a Mac with an Arm chip, install nodejs from source. The easiest way to do this is probably using nvm.

Using the native nodejs, run npm install.

As of 2021-02-15, you get an error from the puppeteer package, which tries to download a copy of Chromium, but fails to find one for Arm Macs.

Additional context

There's an easy fix for this, which is to set an environment variable before running npm install to skip the chromium download:

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
npm install

Alternatively, you can just use an Intel build of nodejs through Rosetta, which will successfully download the Intel build of Chromium.

@yusefnapora
Copy link
Collaborator Author

upstream issue in puppeteer: puppeteer/puppeteer#6622

@zebateira
Copy link
Contributor

Thank you for the report!
I think adding the fix to the troubleshooting section would be sensible: https://github.com/ProtoSchool/protoschool.github.io/blob/main/DEVELOPING_TUTORIALS.md#troubleshooting

Thoughts @terichadbourne ?

@terichadbourne
Copy link
Member

@zebateira @yusefnapora Yes, if there are any installation issues that you expect to come up repeatedly and which we don't have the ability to fix in our own codebase, then adding suggestions would be great. Thanks!

The one caveat here is that you could hit that problem without trying to build a tutorial, just trying to proof for someone else, right? So perhaps we should link from the installation section of our main README to the troubleshooting section of the developing tutorials guide.

@zebateira
Copy link
Contributor

The one caveat here is that you could hit that problem without trying to build a tutorial, just trying to proof for someone else, right? So perhaps we should link from the installation section of our main README to the troubleshooting section of the developing tutorials guide.

Sounds good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants