Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed at the [email protected] install script. #1424

Closed
royeradames opened this issue Jan 11, 2021 · 36 comments · Fixed by #1426
Closed

Failed at the [email protected] install script. #1424

royeradames opened this issue Jan 11, 2021 · 36 comments · Fixed by #1426

Comments

@royeradames
Copy link

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

@iHildy
Copy link

iHildy commented Jan 12, 2021

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.

@thirionlogan
Copy link

So far, rolling back to 5.0.0 Worked for me

@bgv2
Copy link

bgv2 commented Jan 12, 2021

#1421 is the same issue as this, I believe.

@iHildy
Copy link

iHildy commented Jan 12, 2021

So far, rolling back to 5.0.0 Worked for me

What command did you do to install the older version?

@bajtos
Copy link

bajtos commented Jan 12, 2021

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

Cross-posting from loopbackio/loopback-next#7009 (comment):

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)

@thirionlogan
Copy link

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

@iHildy
Copy link

iHildy commented Jan 12, 2021

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]

@D19cannon
Copy link

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

@mcasto
Copy link

mcasto commented Jan 13, 2021

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.

@rijkvanzanten
Copy link

@kewde This is a pretty big issue, preventing installing SQLite on numerous machines.. See #1413 as well (seems to be a duplicate)

@bfate7
Copy link

bfate7 commented Jan 19, 2021

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

@andrew-barnett
Copy link

same issue #1389

@shaniefrater
Copy link

rolling back to 5.0.0 worked perfectly

@zzzkasper-1995
Copy link

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 —build-from-source —python=/usr/bin/python2

@eramdox
Copy link

eramdox commented Jan 21, 2021

I found this: #1420 . Work for me but... the install process was very slow (50 minutes more or less)

@jpasi
Copy link

jpasi commented Jan 24, 2021

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

@daliusd
Copy link

daliusd commented Jan 24, 2021

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?

@nickrum
Copy link
Contributor

nickrum commented Jan 25, 2021

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

@JvegaG
Copy link

JvegaG commented Jan 26, 2021

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 👍

@jdeltoro88
Copy link

So far, rolling back to 5.0.0 Worked for me

how did you install 5.0.0

arvinxx added a commit to arvinxx/umi-electron-template that referenced this issue Feb 3, 2021
@13banda
Copy link

13banda commented Feb 3, 2021

@jdeltoro88 npm install [email protected] working for me

@nicolas-van
Copy link

Same issue here.

zemlanin added a commit to zemlanin/scroll that referenced this issue Feb 8, 2021
@DJviolin
Copy link

Rolling back to [email protected] on Windows also worked for me.

@yangvaz
Copy link

yangvaz commented Feb 13, 2021

I had the same issue.
Rolling back to [email protected] worked fine for me, thank god

@kewde
Copy link
Collaborator

kewde commented Feb 15, 2021

I don't have direct access to the AWS S3 bucket so I can not manually edit the files. I have however attempted to rebuild the v5.0.1 which should add the missing N-API v6 binaries for the v5.0.1 release.

@daliusd
Copy link

daliusd commented Feb 18, 2021

Release v5.0.2 has binaries 🥳

@endiesworld
Copy link

endiesworld commented Mar 2, 2021

hi, do
npm uninstall node-pre-gyp --save
npm install @mapbox/node-pre-gyp --save
npm install sqlite3

the above solved my issue.

@maitrungduc1410
Copy link

downgrade to 5.0.0 is not working for me, I have to downgrade to 4.1.1

@yokinzzz
Copy link

downgrade is not working for me

@daliusd
Copy link

daliusd commented Mar 26, 2021

All versions 5.0.0, 5.0.1 and 5.0.2 are working. The only problem with 5.0.1 is that it does not have binaries but they can be build during install phase if you have built tools installed.

If you have problem with 5.x version then the problem most probably is in your side.

@deepahn
Copy link

deepahn commented May 12, 2021

This is a network issue and related to proxy setting. Please check proxy setting. I realized my Proxy setting was not working after checking that extensions in VScode was not loading. Now everything is working smoothly!

Strangely the issue was also failing after step > node-pre-gyp install --fallback-to-build.
After running commands , installing the packages separately, none of them worked.

Later realized this issue happen because the proxy is not set correctly. I removed the environment variable http_proxy and https_proxy. after that the npm install had no issue running command node-pre-gyp install --fallback-to-build and downloading dependency.

@a-k-o-r-e-d-e
Copy link

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 —build-from-source —python=/usr/bin/python2

As at Jul 2021 this solved the problem for me

@MikeDimmickMnetics
Copy link

If trying to build 5.0.1 from source on Windows, you will need to use Visual Studio 2017 or higher. I got the same error as @bajtos above when using Visual Studio 2015.

Ensure that you have VS2017 or 2019 C++ build tools available - use Add Or Remove Programs, and click Modify, to see which Visual Studio components you have installed. To force Node to build with the later tools, run:

npm config set msvs_version 2017

or

npm config set msvs_version 2019

as appropriate.

@CleitonGuilherme
Copy link

Esta é a mensagem de erro completa que estou recebendo ao tentar instalar o sqlite3.

$ npm e sqlite3

[email protected] install D:\Lambda\projects\greg\chaqar-data\node_modules\sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Usando solicitação para node-pre-gyp https download node-pre-gyp WARN Tentativa de download (403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1 /napi-v6-win32-x64.tar.gz node-pre-gyp WARN Binários pré-criados não encontrados para [email protected] e [email protected] (node-v83 ABI, desconhecido) (recorrendo à compilação de origem com node-gyp) gyp ERR! encontrar VS gyp ERR! encontre VS msvs_version não definido na linha de comando ou npm config gyp ERR! encontre o VS VCINSTALLDIR não definido, não sendo executado no VS Command Prompt gyp ERR! find VS não pôde usar o PowerShell para encontrar o Visual Studio 2017 ou gyp ERR mais recente! encontre o VS procurando pelo Visual Studio 2015 gyp ERR! encontrar VS - não encontrado gyp ERR! encontre o VS não procurando pelo VS2013, pois ele só é suportado até Node.js 8 gyp ERR! encontrar VS gyp ERR! encontrar VS ************************************************** ************** gyp ERR! find VS Você precisa instalar a versão mais recente do Visual Studio gyp ERR! encontre o VS incluindo a carga de trabalho "Desktop development with C++". gyp ERR! find VS Para mais informações consulte a documentação em: gyp ERR! encontre VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! encontrar VS ************************************************** ************** gyp ERR! encontrar VS gyp ERR! configurar erro gyp ERR! Erro de pilha: não foi possível encontrar nenhuma instalação do Visual Studio para usar gyp ERR! pilha em VisualStudioFinder.fail (C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! pilha em C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! pilha em VisualStudioFinder.findVisualStudio2013 (C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! pilha em C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! pilha em C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! pilha em C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! pilha em C:\Users\Owner\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! pilha em ChildProcess.exithandler (child_process.js:315:5) gyp ERR! pilha em ChildProcess.emit (events.js:315:20) gyp ERR! pilha em mayClose (internal/child_process.js:1048:16) gyp ERR! Sistema 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! nó -v v14.15.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! não ok nó-pre-gyp ERR! nó-pré-gyp ERR! Erro de pilha: Falha ao executar '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) nó-pre-gyp ERR! pilha em ChildProcess. (D:\Lambda\projects\greg\chaqar-data\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! pilha em ChildProcess.emit (events.js:315:20) nó-pré-gyp ERR! empilhar em mayClose (internal/child_process.js:1048:16) node-pre-gyp ERR! pilha em Process.ChildProcess._handle.onexit (internanode-pre-gyp ERR! pilha em mayClose (internal/child_process.js:1048:16) node-pre-gyp ERR! pilha em Process.ChildProcess._handle.onexit (interdanal/ child_process.js:288:5) gy node-pre-gyp ERR! Sistema Windows_NT 10.0.17134 node-pre-gyp ERR! comando "C:\Program Files\nodejs\node.exe" "D:\Lamblida\projects\ greg\chaqar-data\node_modules\node-pre-gyp\bin\node-pre-gyp" "instalar" "--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. nó-pré-gyp ERR! node-pre-gyp -v v0.11.0 ur node-pre-gyp ERR! not ok od Falha ao executar 'C:\Program Files\nodejs\node.exe C:\Users\Owner\AppDate=a\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js confisigure --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 opcional PULAR DEPENDÊNCIA OPCIONAL: [email protected] (node_moduarles\fsevents): npm WARN notsup PULAR DEPENDÊNCIA OPCIONAL: plataforma não suportada para [email protected]: queria {"os":"darwin","arch":"any"} (atual: {"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! Status de saída 1 npm ERR! npm ERR! Falha no script de instalação [email protected]. npm ERR! Isso provavelmente não é um problema com o npm. Provavelmente há saída de registro adicional acima.

npm ERR! Um log completo desta execução pode ser encontrado em: npm ERR! C:\Users\Proprietário\AppData\Roaming\npm-cache_logs\2021-01-11T18_05_27_207Z-debug.log

mano no meu para poder resolver o erro foi só instalar o pyton que eu ainda não tinha na maquina, tente isso, acredito que vai da certo., caso contrario, remova o node_modules e package.son e depois npm i acredito que vai resolver, porém tente a primeira opção.

@raja-muhammad-asher
Copy link

raja-muhammad-asher commented Nov 8, 2022

sudo apt install python
sudo apt install node-gyp
sudo apt upgrade node-gyp
npm install --build-from-source --python=/usr/bin/python2

Solved my issue for Ubuntu 22.04 and version 5.0.2

@craverath
Copy link

I love u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.