Hi Colleagues,
node-sqlite3 version: 4.1.0
node version: v13.1.0
operating system and architecture: Win 10 64 bit
I'm trying to install the sqlite3 wtih this command:
npm install sqlite3 --build-from-source
but I got the following error:
C:\Users\<name>\Dev\VSCodeworkspace\productdb>npm install --save-dev sqlite3
[email protected] install C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v79-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 47, in
import gyp
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 9, in
import copy
File "C:\Python27\lib\copy.py", line 52, in
import weakref
File "C:\Python27\lib\weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3
node-pre-gyp ERR! node -v v13.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\<name>\Dev\VSCodeworkspace\productdb\node_modules\sqlite3\lib\binding\node-v79-win32-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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:
2019-11-19T08_48_26_760Z-debug.log
Is it possible to install it somehow?
Best Regards,
Laszlo
Possible duplicate of #1246
Workaround is to downgrade node to 12.x
Thanks @piotr-cz! Downgrade solved my problem.
npm uninstall sqlite3
and then:
npm install --save sqlite3
Most helpful comment
npm uninstall sqlite3
and then:
npm install --save sqlite3