0

I am having above error when I am trying to run my packaged app on windows. It works perfectly fine on linux.

Expected directory: electron-v2.0-win32-ia32-unknown
Found: node-v57-linux-x64-glibc

This is where expected directory was supposed to be:

"/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node"

package.json

    "dependencies": {
    "electron": "^2.0.10",
    "firebase": "^5.5.2",
    "material-design-lite": "^1.3.0"
  },
  "devDependencies": {
    "electron-packager": "^12.2.0",
    "electron-rebuild": "^1.8.2"
  }

Things I tried:

Let me know if you need any other detail.

Lcukerd
  • 438
  • 6
  • 21

1 Answers1

5

You have to rebuild the package in your Electron's version. For example, here is the command I use to rebuild my C++ package for my Electron App :

npm rebuild --runtime=electron --target=2.0.11 --disturl=https://atom.io/download/electron --abi=57

You have to say to npm rebuild the runtime (electron in this case), the version target you want (2.0.11 in my case), the disturl is used to download Electron release and finally the ABI of your Electron's version (you can get this with this command: electron --abi)

Hope this can help you :)

[EDIT]

Here the command to have ABI version with Electron installed in global: Screenshot Electron

Or here when I want the Electron's version & ABI installed in my project: Screenshot Electron

Toinane
  • 51
  • 4