rebuild icon indicating copy to clipboard operation
rebuild copied to clipboard

Failed to rebuild SQLite3 on Windows 7 x64

Open SarbashisKundu opened this issue 7 years ago • 3 comments

Package.json { "name": "billingapp", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "rebuild": "electron-rebuild -f -w billingapp" }, "author": "S Kundu", "license": "ISC", "dependencies": { "electron": "^1.7.11", "sqlite3": "^3.1.13" }, "devDependencies": { "electron-rebuild": "^1.7.3" } }

I am getting the below error:

× 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. C:\Users\sintu\Desktop\billingApp\node_modules\sqlite3\build\deps\action_before_build.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\sintu\Desktop\billingApp\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\sintu\Desktop\billingApp\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=1.7.11" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=C:\Users\sintu\Desktop\billingApp\node_modules\sqlite3\lib\binding\electron-v1.7-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v3.1.13/{toolset}/" "--package_name=electron-v1.7-win32-x64.tar.gz" gyp ERR! cwd C:\Users\sintu\Desktop\billingApp\node_modules\sqlite3 gyp ERR! node -v v8.9.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\sintu\Desktop\billingApp\node_modules\sqlite3\build\deps\action_before_build.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\sintu\Desktop\billingApp\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\sintu\Desktop\billingApp\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=1.7.11" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=C:\Users\sintu\Desktop\billingApp\node_modules\sqlite3\lib\binding\electron-v1.7-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v3.1.13/{toolset}/" "--package_name=electron-v1.7-win32-x64.tar.gz" gyp ERR! cwd C:\Users\sintu\Desktop\billingApp\node_modules\sqlite3 gyp ERR! node -v v8.9.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

Failed with exit code: 1 at SafeSubscriber._error (C:\Users\sintu\Desktop\billingApp\node_modules\spawn-rx\lib\src\index.js:277:84) at SafeSubscriber.__tryOrUnsub (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:239:16) at SafeSubscriber.error (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:198:26) at Subscriber._error (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:129:26) at Subscriber.error (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:103:18) at MapSubscriber.Subscriber._error (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:129:26) at MapSubscriber.Subscriber.error (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:103:18) at SafeSubscriber._next (C:\Users\sintu\Desktop\billingApp\node_modules\spawn-rx\lib\src\index.js:251:65) at SafeSubscriber.__tryOrUnsub (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:239:16) at SafeSubscriber.next (C:\Users\sintu\Desktop\billingApp\node_modules\rxjs\Subscriber.js:186:22) npm ERR! code ELIFECYCLE npm ERR! errno 4294967295 npm ERR! [email protected] rebuild: electron-rebuild -f -w billingapp 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\sintu\AppData\Roaming\npm-cache_logs\2018-01-30T17_17_10_520Z-debug.log

SarbashisKundu avatar Jan 30 '18 17:01 SarbashisKundu

I am also unable to rebuild SQLite3 on Windows 7 x64. In my case the error is:

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 Traceback (most recent call last): File "....\deps\extract.py", line 8, in ? tfile.extractall(dirname) AttributeError: 'TarFile' object has no attribute 'extractall' C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with co de 1. [D:\PycharmProjects\outlookEmailer\node_modules\sqlite3\build\deps\action_before_build.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (D:\PycharmProjects\outlookEmailer\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\PycharmProjects\outlookEmailer\node_modules\node-gyp\bin\node-gyp .js" "rebuild" "--target=1.8.4" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=n ode_sqlite3" "--module_path=D:\PycharmProjects\outlookEmailer\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64" "-- host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.0/{toolset}/" "--package_name=electron-v1.8-win32-x 64.tar.gz" gyp ERR! cwd D:\PycharmProjects\outlookEmailer\node_modules\sqlite3 gyp ERR! node -v v8.10.0 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. unpack_sqlite_dep Traceback (most recent call last): File "....\deps\extract.py", line 8, in ? tfile.extractall(dirname) AttributeError: 'TarFile' object has no attribute 'extractall' C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with co de 1. [D:\PycharmProjects\outlookEmailer\node_modules\sqlite3\build\deps\action_before_build.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (D:\PycharmProjects\outlookEmailer\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\PycharmProjects\outlookEmailer\node_modules\node-gyp\bin\node-gyp .js" "rebuild" "--target=1.8.4" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=n ode_sqlite3" "--module_path=D:\PycharmProjects\outlookEmailer\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64" "-- host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.0/{toolset}/" "--package_name=electron-v1.8-win32-x 64.tar.gz" gyp ERR! cwd D:\PycharmProjects\outlookEmailer\node_modules\sqlite3 gyp ERR! node -v v8.10.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

Failed with exit code: 1 at SafeSubscriber._error (D:\PycharmProjects\outlookEmailer\node_modules\spawn-rx\lib\src\index.js:277:84) at SafeSubscriber.__tryOrUnsub (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:242:16) at SafeSubscriber.error (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:201:26) at Subscriber._error (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:132:26) at Subscriber.error (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:106:18) at MapSubscriber.Subscriber._error (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:132:26) at MapSubscriber.Subscriber.error (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:106:18) at SafeSubscriber._next (D:\PycharmProjects\outlookEmailer\node_modules\spawn-rx\lib\src\index.js:251:65) at SafeSubscriber.__tryOrUnsub (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:242:16) at SafeSubscriber.next (D:\PycharmProjects\outlookEmailer\node_modules\rxjs\Subscriber.js:189:22)

ssimo3lsuhsc avatar Apr 09 '18 20:04 ssimo3lsuhsc

Works on Window 7x64

  1. Go to "C:\Program Files (x86)\Microsoft Visual Studio\Installer\ and run the Visual Studio Installer
  2. Click on Modify under the Visual Studio Build Tools 2017 section
  3. Click on Visual C++ Build Tools section, and install VC++ 2015.3 v14.00 (v140) toolset for desktop
  4. Restart the computer and re-run the build process

This is assuming you have installed node-gyp, one of the pre-reqs for running electron rebuild via the npm install --global --production windows-build-tools command. Instructions for this are found here.

You tools, paths, and naming might be different, so YMMV, but this should work assuming a vanilla install.

PythonDevOp avatar Oct 07 '18 01:10 PythonDevOp

I missed this step while installing visual studio, thank you. solved the problem

sankarcheppali avatar Jan 30 '19 14:01 sankarcheppali