Skip to content

Instantly share code, notes, and snippets.

@pvaladez
Last active July 1, 2025 00:28
Show Gist options
  • Select an option

  • Save pvaladez/0d4e94440bc8b8224b522b5343dbe1ee to your computer and use it in GitHub Desktop.

Select an option

Save pvaladez/0d4e94440bc8b8224b522b5343dbe1ee to your computer and use it in GitHub Desktop.
Apple Silicon Node & Stencil CLI Notes

Rosetta

  • Install rosetta: softwareupdate --install-rosetta

  • To check architecture mode in shell: arch

    • x86_64/x64 mode: i386

    • arm64 mode: arm64

  • To open shell in x86 mode: arch -x86\_64 zsh

    • Alternatively, you can enable the “Open with Rosetta” in the application “get info” options
  • When using nvm to install node version, append this option:  --shared-zlib

Homebrew

  • To install in each mode, open a shell with the arch command ^

  • Installed in x86 mode: /usr/local/bin/brew

  • Installed in arm64 mode: /opt/homebrew/bin/brew

Node.js

Node.js version 16 introduced compatibility for m1 apple silicon, so node versions before v16 need to be installed in x86_64 architecture mode. 

When installing nvm, see the nvm github readme page section on “Macs with M1 chip”: https://github.com/nvm-sh/nvm 

  • Install node.js version 12.22.12: nvm install 12.22.12 --shared-zlib

  • Check node architecture: node -p process.arch

  • Of course, we don’t forget how to list global packages: npm list --global --depth 0

Bigcommerce stencil-cli

Before trying to install the old version that actually works(v3.6.2), don’t forget to setup git global config:

  • git config --global url."https\://github".insteadOf git://github

Then you should be able to install stencil-cli:

  • npm install -g @bigcommerce/stencil-cli\@3.6.2 --verbose

When installing npm packages in a project, some people in forums have said using this option helps: npm install --target\_arch=x64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment