LinusU / node-appdmg

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

compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 59 #155

Closed Unshackle8078 closed 6 years ago

Unshackle8078 commented 6 years ago
module.js:670
  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 57. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (module.js:670:18)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/appdmg/node_modules/macos-alias/lib/create.js:7:13)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)

I can't get whatever needs to be updated/recompiled to do so.

I've tried:

brew update
brew upgrade
brew upgrade node

npm update -g n
npm update -g npm
npm update -g appdmg
n stable
npm update -g node
npm rebuild -g node

No luck - I'm sure I'm missing some obvious command but have no idea what it is.

Unshackle8078 commented 6 years ago
$ npm install
npm WARN saveError ENOENT: no such file or directory, open '[CURRENT DIR]/package.json'
npm WARN enoent ENOENT: no such file or directory, open '[CURRENT DIR]/package.json'
npm WARN GVIEWER_MAC No description
npm WARN GVIEWER_MAC No repository field.
npm WARN GVIEWER_MAC No README data
npm WARN GVIEWER_MAC No license field.

Not sure what to do about that either. There is a package-lock.json but no package.json.

LinusU commented 6 years ago

npm rebuild -g macos-alias perhaps?

Unshackle8078 commented 6 years ago

@LinusU Unfortunately nope

Unshackle8078 commented 6 years ago

Well. Maybe my configuration broke itself - not sure. Got it working by running:

Re-downloaded & installed from: https://nodejs.org/en/download/

Ran: npm install -g appdmg again and not the same call that was working before is working again.

jbeenie commented 4 years ago

I ran into the same issue. The following fixed the problem for me:

npm uninstall -g appdmg npm install -g appdmg