Node-sqlite3: Failed at the [email protected] install script.

Created on 11 Jan 2021  路  20Comments  路  Source: mapbox/node-sqlite3

This is the full error message I am getting when trying to install sqlite3.

$ npm i sqlite3

[email protected] install D:\Lambda\projects\greg\chaqar-data\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/v5.0.1/napi-v6-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS *******************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS
*******************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3\lib\binding\napi-v6-win32-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3
gyp ERR! node -v v14.15.1
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 'C:\Program Files\nodejs\node.exe C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3\lib\binding\napi-v6-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack at ChildProcess. (D:\Lambda\projects\greg\chaqar-data\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internanode-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (interdanal/child_process.js:288:5) gy
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\Lamblida\projects\greg\chaqar-data\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3
node-pre-gyp ERR! node -v v14.15.1 a\
node-pre-gyp ERR! node-pre-gyp -v v0.11.0 ur
node-pre-gyp ERR! not ok od
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Owner\AppDate=a\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js confesigure --fallback-to-build --module=D:\Lambda\projects\greg\chaqar-data\noapde_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\Lambda\projects\greg\chaqar-data\nolede_modules\sqlite3\lib\binding\napi-v6-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) ev
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_moduarles\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install:node-pre-gyp install --fallback-to-build` na
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 additio_0nal logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Owner\AppData\Roaming\npm-cache_logs\2021-01-11T18_05_27_207Z-debug.log

Most helpful comment

So far, rolling back to 5.0.0 Worked for me

All 20 comments

I am getting the same error. I very well could be wrong but https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz does not seem to work.

So far, rolling back to 5.0.0 Worked for me

1421 is the same issue as this, I believe.

So far, rolling back to 5.0.0 Worked for me

What command did you do to install the older version?

We are observing errors when installing [email protected] on Windows in AppVeyor. Previous versions worked fine.

Cross-posting from https://github.com/strongloop/loopback-next/pull/7009#issuecomment-758828528:

lerna ERR! npm ci exited 1 in '@loopback/typeorm'
lerna ERR! npm ci stdout:
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  nothing.c
  win_delay_load_hook.cc
  nothing.vcxproj -> C:\projects\loopback-next\extensions\typeorm\node_modules\sqlite3\build\Release\\nothing.lib
  unpack_sqlite_dep
  sqlite3.c
  win_delay_load_hook.cc
  sqlite3.vcxproj -> C:\projects\loopback-next\extensions\typeorm\node_modules\sqlite3\build\Release\\sqlite3.lib
  backup.cc
  database.cc
..\src\database.cc(35): error C2248: 'Napi::Env::DefaultFini': cannot access private member declared in class 'Napi::Env' [C:\projects\loopback-next\extensions\typeorm\node_modules\sqlite3\build\node_sqlite3.vcxproj]
  c:\projects\loopback-next\extensions\typeorm\node_modules\node-addon-api\napi-inl.h(475): note: see declaration of 'Napi::Env::DefaultFini'
  C:\projects\loopback-next\extensions\typeorm\node_modules\node-addon-api\napi.h(168): note: see declaration of 'Napi::Env'
  node_sqlite3.cc
  statement.cc
  win_delay_load_hook.cc
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\projects\loopback-next\extensions\typeorm\node_modules\sqlite3\lib\binding\napi-v6-win32-ia32\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\projects\loopback-next\extensions\typeorm\node_modules\sqlite3\lib\binding\napi-v6-win32-ia32 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)

So far, rolling back to 5.0.0 Worked for me

What command did you do to install the older version?

@iHildy I manually changed my package.json from "sqlite3": "5.0.1", to "sqlite3": "5.0.0", and ran npm install

So far, rolling back to 5.0.0 Worked for me

What command did you do to install the older version?

@iHildy I manually changed my package.json from "sqlite3": "5.0.1", to "sqlite3": "5.0.0", and ran npm install

Yea I did npm install [email protected]

Had te same problem. v5.0.0 worked for me.

Ditto. Rolling it back to 5.0.0 worked for me too. Of course, this isn't a problem with sqlite3, but it seems like a lot of us have encountered the problem while installing sqlite3.

@kewde This is a pretty big issue, preventing installing SQLite on numerous machines.. See https://github.com/mapbox/node-sqlite3/issues/1413 as well (seems to be a duplicate)

Same issue , But rolling it back to 5.0.0 worked fine.

same issue #1389

rolling back to 5.0.0 worked perfectly

For ubuntu 20.04.
it helped me to solve the problem

sudo apt install python
sudo apt install node-gyp
sudo apt upgrade node-gyp
npm install 鈥攂uild-from-source 鈥攑ython=/usr/bin/python2

I found this: https://github.com/mapbox/node-sqlite3/issues/1420 . Work for me but... the install process was very slow (50 minutes more or less)

This version works, try!
npm i [email protected]

Basically the problem is that there are no prebuilt binaries for many platforms and if you don't have built tool installed on your machine you must use older version.

Did someone forgot to run npx node-pre-gyp publish or maybe there is process that must do that automatically and has failed to do that?

The buildbots should have published the binaries with 833f5cc1332b9213a17873f42a3d3a18dca5afc1, but that failed due to a recent change. This should hopefully be fixed once #1426 is merged and someone has retriggered the buildbots.

So far, rolling back to 5.0.0 Worked for me

What command did you do to install the older version?

@iHildy I manually changed my package.json from "sqlite3": "5.0.1", to "sqlite3": "5.0.0", and ran npm install

this solution works for me. Thanks 馃憤

So far, rolling back to 5.0.0 Worked for me

how did you install 5.0.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

csugden picture csugden  路  30Comments

hersoncruz picture hersoncruz  路  27Comments

milu2003 picture milu2003  路  16Comments

jpillora picture jpillora  路  18Comments

sushantdhiman picture sushantdhiman  路  20Comments