karaggeorge / macos-audio-devices

Get, set and configure the Audio Devices on macOS
MIT License
166 stars 17 forks source link

"Bad CPU type in executable" installation error on M1 Mac #23

Open djpowers opened 2 years ago

djpowers commented 2 years ago

I'm getting this error on an M1 Mac when running npx macos-audio-devices:

sh: ~/.npm/_npx/ce1ffa718b3a0753/node_modules/.bin/macos-audio-devices: Bad CPU type in executable

I understand that this is due to not having Rosetta 2 installed, but I'm wondering if it would be possible to build the npm package for Apple Silicon systems (arm64). Not sure how large of an undertaking this would be, but was curious if it might be doable or what such a process might entail.

djpowers commented 1 year ago

For anyone arriving at this issue, the PR linked above hasn't yet been merged, but you can use the forked version as a drop-in replacement:

Thanks @stefansundin for forking and republishing!

dawei101 commented 2 months ago

The forked version also get error Command failed with exit code 1: /private/var/folders/z4/bfqcydyx34l47r9ctb1js4000000gn/T/AppTranslocation/548C3DC1-E239-49D0-9191-1F29BA6CE8B6/d/xxxxxxxx.app/Contents/Resources/app.asar.unpacked/node_modules/@spotxyz/macos-audio-devices/audio-devic...