Installi sqlite3 (windows): node-pre-gyp install --fallback-to-build
npm-sqlite3-inst-info.txt npm-sqlite3-inst-info.txt
I just installed node.js a couple of days ago under Windows 7 (32 bit) with the MSI and have the versions: node -v : v4.4.3 npm -v : 2.15.1
When I try to install sqlite3: "npm install sqlite3 -save", I get:
[email protected] install C:\Users\Frank\AppData\Roaming\npm\node_modules\sqlite3 node-pre-gyp install --fallback-to-build
The command then hangs with no more information. After a long time, I then can use Ctrl-C to break the process (I see no CPU activity for the process): ^CTerminate batch job (Y/N)? y
Now, when I check the ...npm\node_modules folder there an sqlite3 folder created with sub folders and content.
As mentioned, this is a new node.js installation and this is the first npm package installed.
I have attached the output of installing with the command: npm install sqlite3 --loglevel=info
try 'npm install sqlite3 source'
I tried npm install sqlite3 source but got the error I'm getting on any other intsall
node v4.2.4 npm v1.4.3
Failed at the [email protected] install script
What level of Visual Studio compiler do you have installed?
I have same question with using npm install sqlite3 --save.
I do as follow:
download:
Visual Studio Build tools
Python 2.7
installed:
npm install node-gyp -gnode-gyp
Use npm install sqlite3 --build-from-source --save
But I'm failed. npm-debug.txt
console: D:\User\node.workSpace\3dmzt>npm install sqlite3 --build-from-source --save
[email protected] install D:\User\node.workSpace\3dmzt\node_modules\sqlite3 node-pre-gyp install --fallback-to-build
D:\User\node.workSpace\3dmzt\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean ) D:\User\node.workSpace\3dmzt\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64 ) else (node "" configure --fallback-to-build --module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64 )
D:\User\node.workSpace\3dmzt\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64 ) else (node "" build --fallback-to-build --module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64 )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "14.0", "4.0"。
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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64"
gyp ERR! cwd D:\User\node.workSpace\3dmzt\node_modules\sqlite3
gyp ERR! node -v v7.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\User\node.workSpace\3dmzt\node_modules\sqlite3\lib\binding\node-v51-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.
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 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! D:\User\node.workSpace\3dmzt\npm-debug.log
I solve my problem.
the error:MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "14.0", "4.0"。
run npm config set msvs_version 2015.
the error:MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "14.0", "4.0"。 run npm config set msvs_version 2015.
worked! thanks
I meet the same problem, is there any way to solve it?
┌─[kands@kands-MicroPC] - [~] - [二 7月 07, 00:59] └─[$] <> sudo npm i -g sql-language-server [sudo] kands 的密码: /usr/local/bin/sql-language-server -> /usr/local/lib/node_modules/sql-language-server/dist/cli.js
[email protected] install /usr/local/lib/node_modules/sql-language-server/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 Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/10.19.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/.node-gyp'
gyp ERR! System Linux 5.4.0-40-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/lib/binding/node-v64-linux-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sql-language-server/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.
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: npm ERR! /root/.npm/_logs/2020-07-06T17_00_09_122Z-debug.log ┌─[kands@kands-MicroPC] - [~] - [二 7月 07, 01:00] └─[$] <>
I've solved this problem by adding an option '--unsafe-perm', hope it is also useful to you.
npm install sqlite3 --build-from-source --save does not work
npm install sqlite3 --unsafe-perm --save does not work
npm config set msvs_version 2015 && npm install sqlite3 --save does not work
This breaks the Apollo tutorial at https://www.apollographql.com/docs/tutorial/introduction/ on WSL
This may work:
In PowerShell:
wsl --list --verbose
wsl --set-version Ubuntu-20.04 2
In WSL2:
sudo apt-get install python
npm install sqlite
Would you be able to try with v5.0.3? 🙂