Ainda não tem acesso? Estude com a gente! Matricule-se
Ainda não tem acesso? Estude com a gente! Matricule-se

Erro ao instalar o sqlite

Bom dia,

Estou tendo um erro no momento de instalar o "sqlite" utilizando o comando "npm install sqlite3@4.0.2 --save-exact".

Segue descrição do erro:

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.2 and node@10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error connect ETIMEDOUT 52.216.146.235:443 gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:443 gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14) 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\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64" "--napi_version=3" "--node_abi_napi=napi" gyp ERR! cwd C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3 gyp ERR! node -v v10.15.3 gyp ERR! node-gyp -v v3.8.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) node-pre-gyp ERR! System Windows_NT 10.0.17763 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3 node-pre-gyp ERR! node -v v10.15.3 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 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\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi' (1) npm WARN casadocodigo@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.0.2 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.0.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Poderiam ajudar por gentileza.

Obrigado.

4 respostas

estava tendo alguns erros aqui também então instalei com o

npm install sqlite3 --save 

dessa forma peguei a versão mais recente. e funcionou bem com o projeto da aula

Boa tarde Eduardo,

Obrigado pela resposta.

Testei a instalação com o comando passado, mas infelizmente o erro permaneceu.

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.1.1 and node@10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error connect ETIMEDOUT 52.217.12.12:443 gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443 gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14) 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\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" gyp ERR! cwd C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3 gyp ERR! node -v v10.15.3 gyp ERR! node-gyp -v v3.8.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) node-pre-gyp ERR! System Windows_NT 10.0.17763 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3 node-pre-gyp ERR! node -v v10.15.3 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\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\d841179\Desktop\Cursos\Node.js Parte 1 - Inovando com JavaScript no backend\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) npm WARN casadocodigo@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.1.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.1.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Mas obrigado pela ajuda.

Boa tarde, Guilherme! Como vai?

Experimente remover a pasta node_modules e o arquivo package-lock.json que estão dentro da pasta do seu projeto. Depois, tente executar novamente o comando mostrado pelo Eduardo e, em seguida, execute npm install. Daí veja se as coisas funcionam da forma como vc esperava.

Qualquer coisa é só falar!

Grande abraço e bons estudos, meu aluno!

Boa tarde Gabriel,

Obrigado pela resposta.

Segui os passos que você indicou e mesmo assim não funcionou. Com relação às outras instalações que você realizou durante o curso, consegui realizá-las com sucesso. A única que ocorreu o problema foi essa.

Será que pode ser algo relacionado ao proxy?

Obrigado.