question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An unhandled error occurred inside electron-build

See original GitHub issue
  • NodeJS Version: v8.8.1
  • Operating System and Hardware Platform: Windows 10 64 bit, 4GB ram

This is my package.json:

  "scripts": {
     "start": "electron .",
    "postinstall": "install-app-deps",
    "dist": "build",
    "install": "electron-rebuild"
  },
"devDependencies": {
    "electron": "latest",
    "electron-builder": "latest",
    "electron-rebuild": "^1.6.0"
},

I’m getting this error when I run npm install after adding the electron-rebuild install hook

An unhandled error occurred inside electron-rebuild Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch. C:\Users\KCS\Desktop\updatedElec\node_modules\serialport\build\serialport.vcxproj(20,3): error MSB4019: The imported project “C:\Microsoft.Cpp.Default.props” was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\KCS\Desktop\updatedElec\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\KCS\Desktop\updatedElec\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–target=1.7.9” “–arch=x64” “–dist-url=https://atom.io/download/electron” “–build-from-source” gyp ERR! cwd C:\Users\KCS\Desktop\updatedElec\node_modules\serialport gyp ERR! node -v v8.8.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

Failed with exit code: 1

Error: Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch. C:\Users\KCS\Desktop\updatedElec\node_modules\serialport\build\serialport.vcxproj(20,3): error MSB4019: The imported project “C:\Microsoft.Cpp.Default.props” was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\KCS\Desktop\updatedElec\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\KCS\Desktop\updatedElec\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–target=1.7.9” “–arch=x64” “–dist-url=https://atom.io/download/electron” “–build-from-source” gyp ERR! cwd C:\Users\KCS\Desktop\updatedElec\node_modules\serialport gyp ERR! node -v v8.8.1

I checked up with node-serialport devs and they are saying it might be an electron-builder issue.

Can you help me out ?? @paulcbetts @zeke @nono @johnmuhl @malept

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
develarcommented, Nov 13, 2017

Yes.

0reactions
debchycommented, Jul 22, 2019

@mridah , you have both “electron-builder”: “latest”, “electron-rebuild”: “^1.6.0” if you have electron-builder, you don’t need electron-rebuild. just uninstall electron-rebuild and run the electron-builder command.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An unhandled error occurred inside electron-rebuild
Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using ...
Read more >
Native Node Modules | Electron
When in doubt, run electron-rebuild first. Make sure the native module is compatible with the target platform and architecture for your Electron app....
Read more >
electron-rebuild - npm
Electron supporting package to rebuild native node modules against the currently installed electron. Latest version: 3.2.9, last published: ...
Read more >
electronjs - Bountysource
... 找到匹配令牌 [D:\code\tu tor-mupdf-addon\build\tutor-mupdf-addon.vcxproj] × Rebuild Failed An unhandled error occurred inside electron-rebuild node-gyp ...
Read more >
OpenGSN v2.2.1 cannot be built for Electron
@opengsn/provider (v2.2.1) cannot be installed in an Electron app due to issues with native dependencies related to secp256k1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found