run-script-os
run-script-os copied to clipboard
`npx run-script-os` fails on Apple Mac M1
I recently changed my workstation to an Apple Mac M1 and I was running the run-script-os with npx.
With the above system change, suddenly the commands we failing with the following error.
Script
"compile": "npx run-script-os",
"compile:win32": "..\\..\\node_modules\\.bin\\tsc -p tsconfig.json --incremental",
"compile:default": "../../node_modules/.bin/tsc -p tsconfig.json --incremental",
Stacktrace
run-script-os was unable to execute the script 'npx'
npm ERR! Lifecycle script `compile` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: ---
npm ERR! at location: ---
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: ---
npm ERR! at location: ---
When I remove the npx prefix, everything works. Any ideas?
Having the same issue on a different environment (Linux).
For macOS you would need to ensure you have the development dependency:
npm i -D dmg-license
If that fails you can always add "build:default". Pretty much been using "build:default" as the m1 detector. I know this is not very reliable but it's what you got.
We ended up removing run-script-os entirely from our project.
@FranciscoKloganB I added architecture detection in this PR so you can specify arm64, x64, etc- https://github.com/charlesguse/run-script-os/pull/54
postinstall:darwin- OSXpostinstall:darwin-x64- Intel Macspostinstall:darwin-arm64- Apple Silicon/ARM Macs