Jesús Amieiro

Installing wordpress-develop on M1 chip

I have had some problems installing wordpress-develop on the M1 chip, so I describe here how I have solved it.

npm install

When I execute the

npm install

I have this error:

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

To solve this error, I follow the steps from this link.

First, I install Chromium with brew:

brew install --cask chromium

Then I edit the ~/.zshrc file:

sudo nano ~/.zshrc

And add these 2 strings:

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`

Then I reload the ~/.zshrc content:

source ~/.zshrc

Then I remove node modules, package-lock.json & cache from the project:

rm -rf node_modules/
rm -rf package-lock.json
rm -rf .cache

Now, I can finish the npm installation.

npm install

npm run build:dev

Once I resolve the previous error, I have this one when I execute

npm run build:dev
Version: webpack 4.43.0
Warning: Use --force to continue.

Aborted due to warnings.

To solve this problem, I edit the package.json file, adding the “–force” parameter in this line:

"build:dev": "grunt build --dev --force",

MySQL 5.7

Running

npm run env:start

I have this error:

Pulling mysql (mysql:5.7)…
5.7: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

This is a problem related to M1 and Docker. To solve it, I execute:

docker pull --platform linux/x86_64 mysql:5.7

Now I can execute:

npm run env:start

These are the workarounds I have followed to install and execute the wordpress-develop dockerized platform on an M1 chip.

Exit mobile version