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:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Yes.
@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.