Open linhongyi opened 1 year ago
Same here:
(node:17717) UnhandledPromiseRejectionWarning: Error: Command failed: bless --folder /Volumes/... 1 --openfolder /Volumes/... 1 bless: The 'openfolder' is not supported on Apple Silicon devices.
Same problem here. My terminal is in i386 but it still reports this error so it's unable to complete a build
Hi, please have a look at #216 .
Unfortunately it didn't help #216.
I ran into this problem since updated to macOS Ventura 13.0.1 yesterday.
As a hacky workaround, I commented out the following line in node_modules/appdmg/lib/appdmg.js
:
args.push('--openfolder', global.temporaryMountPath)
This is of course merely a hacky workaround and by no means a proper solution, but it may be helpful.
@Chentai-Kao, This worked like a charm. Thanks a lot 🎉 . What could be the implications of building a dmg this way?
I think that the problem is that you are running appdmg under Rosetta, can you check if this is the case and try running appdmg using an arm-native version of Node instead?
Would including a check for rosetta be applicable?
Snip: Moved code to PR
Ref Links: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment#3616845 https://stackoverflow.com/questions/65346260/get-real-architecture-of-m1-mac-regardless-of-rosetta
We hit this problem as well, any chance PR #223 could be looked at and merged if it fixes the issues?
For those encountering this issue while waiting for @LinusU to merge the pending PR fix, you can use a package.json override pointed to the PR fork:
{
// rest of package.json
"overrides": {
"appdmg": "github:SReject/node-appdmg#872599493f64dbd192fd69adea33633a563e3a5d"
}
}
Its fully compatible with the appdmg v0.6.6
I've found that this error emerges when node's architecture doesn't match the machine's – usually, this means you're running x64 node on an arm64 (M1, M2) Mac.
Here's how to find out what architecture is being used for node:
node -p "process.arch"
If that says x64
, you may want to reinstall node.. and probably run npm rebuild
to update any native modules. That fixed the problem for me.
These below may help:
I'm using the latest version (0.6.4) of node-appdmg.
I found out that this problem has been solved on other osx versions. But I am on macOS Ventura 13.0.1, and I still encounter the same problem.
The log is as follows.
Error: Command failed: bless --folder /Volumes/xxxx --openfolder /Volumes/xxxx bless: The 'openfolder' is not supported on Apple Silicon devices.
Any solution thanks.