LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.69k stars 152 forks source link

Error with Node v14 (macOS 10.14.6) #191

Closed koddr closed 1 year ago

koddr commented 4 years ago

Hello!

After update Node to v14 on my MacBook Pro (with macOS 10.14.6), I see this error (appdmg was installed globally):

$ appdmg ./configs/macOS/appdmg.config.json ./releases/macOS/myapp-macosx-amd64.dmg

internal/modules/cjs/loader.js:1250
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The module '/usr/local/lib/node_modules/appdmg/node_modules/macos-alias/build/Release/volume.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 79. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/appdmg/node_modules/macos-alias/lib/create.js:7:13)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)

My system:

$ uname -a
Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64

$ node -v
v14.3.0

$ npm -v
6.14.5

Re-compiling or re-installing not works, I'm still getting this error.

How to solve it? Please, help me 😉

sudara commented 2 years ago

The dependencies need updating. For now you can use locally like so:

git clone https://github.com/LinusU/node-appdmg.git
cd node-appdmg
npm update
bin/appdmg.js yourConfig.json your.dmg
LinusU commented 1 year ago

The module was compiled against a different Node.js version using NODE_MODULE_VERSION 79. This version of Node.js requires NODE_MODULE_VERSION 83. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

I think that the error message is quite clear? Run npm rebuild or npm install...