rebuild
rebuild copied to clipboard
An unhandled error occurred inside electron-rebuild
I am new to NodeJs, I'm working with an Electron app I want to connect my app with SqLite, I have already Installed:
-
sqlite3
-
Electron & Electron rebuild
-
Python and VS desktop development tools
But I'm still can't run my program due to following errors:
E:\electron\hy>npm run rebuild
> [email protected] rebuild E:\electron\hy
> electron-rebuild -f -w sqlite3
× Rebuild Failed
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.
unpack_sqlite_dep
'C:\Users\C' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: "cmd.exe" exited with code 1. [E:\electron\hy\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (E:\electron\hy\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\electron\\hy\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=8.2.2" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=node_sqlite3" "--module_path=E:\\electron\\hy\\node_modules\\sqlite3\\lib\\binding\\electron-v8.2-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.1.1/{toolset}/" "--package_name=electron-v8.2-win32-x64.tar.gz"
gyp ERR! cwd E:\electron\hy\node_modules\sqlite3
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v6.1.0
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.
unpack_sqlite_dep
'C:\Users\C' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: "cmd.exe" exited with code 1. [E:\electron\hy\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (E:\electron\hy\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\electron\\hy\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=8.2.2" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=node_sqlite3" "--module_path=E:\\electron\\hy\\node_modules\\sqlite3\\lib\\binding\\electron-v8.2-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.1.1/{toolset}/" "--package_name=electron-v8.2-win32-x64.tar.gz"
gyp ERR! cwd E:\electron\hy\node_modules\sqlite3
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
Failed with exit code: 1
at SafeSubscriber._error (E:\electron\hy\node_modules\spawn-rx\lib\src\index.js:267:84)
at SafeSubscriber.__tryOrUnsub (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.error (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:156:26)
at Subscriber._error (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:92:26)
at Subscriber.error (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:72:18)
at SafeSubscriber._next (E:\electron\hy\node_modules\spawn-rx\lib\src\index.js:242:65)
at SafeSubscriber.__tryOrUnsub (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.next (E:\electron\hy\node_modules\rxjs\internal\Subscriber.js:143:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] rebuild: `electron-rebuild -f -w sqlite3`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jawad\AppData\Roaming\npm-cache\_logs\2020-04-14T03_12_17_340Z-debug.log
My Package.json file:
{
"name": "hy",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron .",
"rebuild": "electron-rebuild -f -w sqlite3"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^8.2.2",
"sqlite3": "^4.1.1"
},
"devDependencies": {
"electron-rebuild": "^1.10.1"
}
}
Same here :(
mark
Same here, not rebuilding sqlite3 and @journeyapps/sqlcipher
Any workaround solution?
same december 2020
same
try upgrading your version of sqlite3 to v5.0.0
here is a more detailed explanation of the same error https://stackoverflow.com/a/50112270/4722811
"dependencies": {
"sqlite3": "^5.0.0"
}
this worked for me
try upgrading your version of sqlite3 to v5.0.0
here is a more detailed explanation of the same error https://stackoverflow.com/a/50112270/4722811
"dependencies": { "sqlite3": "^5.0.0" }
this worked for me
I only used electron and xterm and still have this problem ON MAC On Windows it's rebuild multiple times and succeeded
same here!
i have the same issue
i have the same issue too 😭