[wp-trac] [WordPress Trac] #52356: npm install does not work on wordpress-trunk on new Mac M1's

WordPress Trac noreply at wordpress.org
Mon Jan 25 07:06:55 UTC 2021


#52356: npm install does not work on wordpress-trunk on new Mac M1's
--------------------------------+-----------------------------
 Reporter:  justinahinon        |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  External Libraries  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 I've been trying to run a development environment to contribute to
 WordPress on my new MacBook M1 for some time now, but I go through a lot
 of mistakes every time.

 The first one is that some libraries used by WordPress Core are not yet
 supported on the ARM architectures of the new Macs (I guess).

 For example, running {{{ npm install }}} from a folder with WordPress
 Trunk returns this error:


 {{{
 Error
     at /Users/segbedji/wp/wordpress-develop/node_modules/grunt-contrib-
 qunit/node_modules/puppeteer/lib/BrowserFetcher.js:112:19
     at FSReqCallback.oncomplete (fs.js:183:21)
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! puppeteer at 4.0.1 install: `node install.js`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the puppeteer at 4.0.1 install script.
 npm ERR! This is probably not a problem with npm. There is likely
 additional logging output above.
 }}}

 After some research, the puppeteer package has several incompatibilities
 with the Macs M1, and many issues have already been reported on their
 repo: https://github.com/puppeteer/puppeteer/issues/6622,
 https://github.com/puppeteer/puppeteer/issues/6634.

 Some solutions have been proposed on the issues. Like this one
 (https://github.com/puppeteer/puppeteer/issues/6622#issuecomment-759840596)
 that doesn't work on my end.

 But it looks like there is an official fix here
 https://github.com/puppeteer/puppeteer/commit/9a8479a52a7d8b51690b0732b2a10816cd1b8aef.
 So I guess upgrading the package version on our end could fix the issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52356>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list