philipp-winterle / crittr

High performance critical css extraction with a great configuration abilities
https://hummal.github.io/crittr/
GNU General Public License v3.0
51 stars 6 forks source link

Support Mac OS M1 arm64 #16

Closed homanp closed 3 years ago

homanp commented 3 years ago

Describe the bug When trying to install this package on a Mac M1 arm64 I get the following error:

The chromium binary is not available for arm64

To Reproduce Steps to reproduce the behavior (Mac M1):

  1. Run npm i crittr

Expected behavior Package should install

Screenshots

Screenshot 2021-02-26 at 10 07 18

Environment (please complete the following information):

philipp-winterle commented 3 years ago

@homanp thx for providing this issue. Iam affraid this is not an issue which crittr is responsible for. As far as my research is valid it should be gone with nodejs 14 and only occur with nodejs 15. Because nodejs 15 is already build for ARM and so it needs to install the arm version of chrome aswell. See more info here: https://github.com/puppeteer/puppeteer/issues/6622#issuecomment-749631712

So in short this is most likely a chromium or a puppeteer issue. We have to wait till they fix it. As an alternative you could try to install chromium on your own as described above "sudo apt install chromium" and set the ENV Flag "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" to true I guess. So it will skil the install and use the current available chromium browser. You may give it a try. But keep in mind that this will be reverted on the next update and install of crittr. As long as there is no fixed set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" Flag, it will install the puppeteer version of chrome the next time. Then hopefully working.

TL;DR: no crittr issue. Will be fixed by either the googlechrome crew or puppeteer uses a workarround and I need to raise it to 8.x.

homanp commented 3 years ago

@hummal yep you are correct :)

Thanks for the swift response!

philipp-winterle commented 3 years ago

You're welcome. :) Hope it is working for you again

philipp-winterle commented 3 years ago

https://github.com/puppeteer/puppeteer/releases/tag/v9.0.0

After the upgrade to puppeteer 9.0.0 Mac M1 should work as expected without workarrounds