Support installation on Mac M1 ARM (using rosetta2)
See original GitHub issueI’m trying to install PACT for testing, I get the following error:
arch -x86_64 npm install @pact-foundation/pact-node
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for @pact-foundation/pact-node@10.11.8: wanted {"os":"darwin,linux,win32","arch":"x64,ia32"} (current: {"os":"darwin","arch":"arm64"})
npm ERR! notsup Valid OS: darwin,linux,win32
npm ERR! notsup Valid Arch: x64,ia32
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: arm64
I have tried with node 12 and node 15. / I have tried to specify arch x86_64
to run on rosseta2, but I think the issue is the call to the binary form js, would need to specify that flag if the architecture is darwin / arm64 pass the arch flag when calling the binary file to run it through rosetta2.
Any other workarounds that you suggest?
Thanks, Pedro
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:25 (15 by maintainers)
Top Results From Across the Web
If you need to install Rosetta on your Mac - Apple Support
Rosetta 2 is available only for Mac computers with Apple silicon. You're asked to install Rosetta the first time you open an app...
Read more >How to Install Rosetta 2 on Apple Silicon Macs - OSXDaily
There are two ways to install Rosetta 2 onto an Apple Silicon Mac; using the Terminal, or by attempting to open a non-native...
Read more >install Rosetta 2 on M1 Mac to run Intel-only Apps
This post tells how to install Rosetta 2 on Mac shipped with M1, M1 Pro, and M1 Max chips to run Intel apps...
Read more >How To Install Rosetta 2 On M1 Mac (Run Intel ... - YouTube
How To Install Rosetta 2 On M1 Mac (Run Intel Apps on Apple Silicon ARM ) ... video on how to install Rosetta...
Read more >Rosetta 2 On Linux VM - Install Ubuntu On M1 Mac ... - YouTube
Install ubuntu 22.04 On VM On M1 Mac Running MacOS 13 Ventura and Run Intel / x86_64 Apps On ARM Linux With Rosetta...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@iknowcss We are using Apple M1 as well. We usually run pact locally, either manually or on commit. To workaround the following error when building via docker:
We added the following to Dockerfile:
Can probably make it more comprehensive by detecting for CPU before setting it. Hope that helps.
This should no longer be required since pact-node@10.13.1 / pact-core@11.1.0 as the cpu limitation was removed https://github.com/pact-foundation/pact-js-core/pull/302
Now pact should just work ™️ with an arm node and rosetta installed 🎉. Thanks @TimothyJones