electron-builder: OS X: Error: Module version mismatch. Expected 48, got 49

  • ^5.30.0:
  • 1.3.3:

When trying to build for OS X getting the following error: tsc && node-gyp rebuild && build --mac

Error: Module version mismatch. Expected 48, got 49. at Error (native) at Object.Module._extensions…node (module.js:583:18) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/macos-alias/lib/create.js:7:13) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/macos-alias/index.js:1:18) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/ds-store/index.js:2:13) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) From previous event: at tsAwaiter (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/electron-builder/src/util/awaiter.ts:10:47) at Object.build (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/electron-builder/src/builder.ts:195:52) at Object.<anonymous> (/Users/Jenia/Desktop/git/electron-angular2-native/node_modules/electron-builder/src/build-cli.ts:27:28) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.runMain (module.js:590:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3

To reproduce:

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (19 by maintainers)

Commits related to this issue

Most upvoted comments

node-gyp-rebuild bin will be added.

Set "nodeGypRebuild": true in your build and remove .npmrc file.

How electron-builder providing a script to perform node-gyp rebuild will help?

Option nodeGypRebuild will be added in 10 minutes. You just set it to true and electron-builder will call it for you with proper env/conf.

I’m not sure this is correct. I use the following in my root binding.gyp for specifying which dependencies to compile:

'dependencies': [ 
                '<!@(find ./app/* -name binding.gyp -not -path \"./**/node_modules/*\" | sed -e s/$/:*/)'
            ]

As you can see it skips all the node_modules folders. Since node-gyp rebuild looks for the binding.gyp in the directory it was called from, I can’t see how node-gyp rebuild invocation would build the macos-alias.

Ok, I will investigate.