Error installing Slice Machine Example project on Macbook Air M1 chip

Hi

I am following the tutorial here: Next.js Starters - Prismic

When I run the install command:

prismic theme --theme-url https://github.com/prismicio-community/slice-library-starter-next --conf sm.json

I am getting an error.

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! puppeteer@5.5.0 install: node install.js

npm ERR! Exit status 1


I tried Node 14 and 15 with nvm.

Any ideas what could be happening here?

Hi Patrick,

Welcome to the Prismic community.

Can you please tell us the is the Prismic CLI you are using?

Fares

Can you please tell us what Prismic CLI command and theme you are using? this command doesn't seem to be valid, you can list you full command in a code braket.

Sorry about that. Here is the command I am running.

prismic theme --theme-url https://github.com/prismicio-community/slice-library-starter-next --conf sm.json

Well, I've tried to reproduce this, but it is working for me as expected.

Can you try to install or compile puppeteer@5.5.0 in an empty project to see what happens? And if we get more explicit errors?

Something like

npm install puppeteer@5.5.0

Thanks Fares for testing this - are you using an Macbook Air with the M1 chip? I think that is the issue as this is what I am seeing when I try install puppeteer

npm install puppeteer@5.5.0

npm ERR! code 1

npm ERR! path /Users/patrick/Code/node_modules/puppeteer

npm ERR! command failed

npm ERR! command sh -c node install.js

npm ERR! The chromium binary is not available for arm64:

Hello,

Thanks for your response; I will create an issue in our tracker regarding this, and I guess we need to create an issue in puppeteer as well if they didn't fix it yet.

Hi,

Just to let you know, I have created an issue in puppeteer project:

OK thanks for the update Fares and for raising the ticket.

Hi @patrick6

In fact, there is already an issue for this, but not sure if it is released already

And it seems that there is already a work-around

I will also check if we can upgrade Slice Machine to v9.0.0

A quick update: our dev team is planning to remove puppeteer from the modules, I will let you know once I get a confirmation.

This thread has been closed due to inactivity. Flag to reopen.

For anyone with a mac m1 (new arm Apple chip), if you wanna install npm modules and it states that it’s not compatible with ARM architecture (node-sass is not compatible for instance), you can remove all your node modules and install them again this way:

npm install --target_arch=x64

It will use rosetta2 and make them compatible as if you were on x64 architecture :wink:

2 Likes