Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#52690 closed defect (bug) (fixed)

`npm install` aborts on Apple Silicon due to Puppeteer not finding appropriate chromium binary

Reported by: afragen's profile afragen Owned by: gziolo's profile gziolo
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

On Apple Silicon, I get an error running npm install from wordpress-develop due to a puppeteer script.

$ npm install

> puppeteer@4.0.1 install /Users/afragen/Local_Beta_Sites/wordpressdevelop/app/public/node_modules/grunt-contrib-qunit/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/afragen/Local_Beta_Sites/wordpressdevelop/app/public/node_modules/grunt-contrib-qunit/node_modules/puppeteer/lib/BrowserFetcher.js:112
            throw new Error();
            ^

Error
    at /Users/afragen/Local_Beta_Sites/wordpressdevelop/app/public/node_modules/grunt-contrib-qunit/node_modules/puppeteer/lib/BrowserFetcher.js:112:19

I am running the shell session in Rosetta (x86_64) emulation. This has previously worked and not certain if it's related to r50441.

Setting export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true in the session does allow for the npm install to complete.

Change History (9)

#2 @afragen
4 years ago

Thanks Aaron

#3 @afragen
4 years ago

I have used nvm to install node v15.x which is able to be compiled for arm64. Must have Xcode Command Line Tools installed.

  • nvm install 15, give this time to compile/build, currently this installs node v15.10.0
  • nvm use 15
  • nvm alias default 15, this so every new session will use this version of node.

Now there's no need to run the shell session under Rosetta.

Last edited 4 years ago by afragen (previous) (diff)

This ticket was mentioned in PR #2509 on WordPress/wordpress-develop by gziolo.


3 years ago
#5

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/52690

There is a brand new version grunt-contrib-qunit that resolves the issue with Puppeteer's installation.

gziolo commented on PR #2509:


3 years ago
#6

I wanted to check CI jobs but locally everything works perfectly fine.

#7 @gziolo
3 years ago

  • Owner set to gziolo
  • Resolution set to fixed
  • Status changed from new to closed

In 53069:

Build: Fix npm install on Apple Silicon

Fixes the issue where npm install aborts on Apple Silicon due to Puppeteer not finding appropriate chromium binary. It works correctly with the latest versio of grunt-contrib-qunit package.

Props afragen, jorbin, SergeyBiryukov.
Fixes #52690.
Related #52356.

#8 @gziolo
3 years ago

  • Milestone changed from Awaiting Review to 6.0
Note: See TracTickets for help on using tickets.