2
respostas

Erro ao instalar Squlite

Ao tentar instalar o sqlite me deparo com esse erro. Node v10.15.3 - NPM 6.9.0

Já realizei a limpeza de cache no NPM (npm cache clean) e o erro persiste.

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 unable to verify the first certificate
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack     at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
gyp ERR! stack     at TLSSocket.emit (events.js:189:13)
gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:633:8)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\taist\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\taist\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\taist\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64" "--napi_version=3" "--node_abi_napi=napi" "--python=C:\\Users\\taist\\.windows-build-tools\\python27\\python.exe"
gyp ERR! cwd C:\Users\taist\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:\Users\taist\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\taist\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\taist\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi --python=C:\Users\taist\.windows-build-tools\python27\python.exe' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\taist\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.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\taist\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\taist\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:\Users\taist\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\taist\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\taist\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=3 --node_abi_napi=napi --python=C:\Users\taist\.windows-build-tools\python27\python.exe' (1)
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\taist\package.json'
npm WARN taist No description
npm WARN taist No repository field.
npm WARN taist No README data
npm WARN taist No license field.

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.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\taist\AppData\Roaming\npm-cache\_logs\2019-03-07T01_50_03_647Z-debug.log
2 respostas

Oi Tais tudo certo ?

Isso está ocorrendo por causa de alugma dependência, tenta instalar usando o comando:

npm install sqlite3@4.0.2 --save-exact

Boa noite, infelizmente o erro persistiu. Porém instalei o Sqlite fora do projeto e funcionou. Mas após dar START na aplicação, foi apresentado esse erro. `

casadocodigo@1.0.0 start C:\casadocodigo nodemon server.js --ignore *.marko.js

[nodemon] 1.18.4 [nodemon] to restart at any time, enter rs [nodemon] watching: . [nodemon] starting node server.js internal/modules/cjs/loader.js:584 throw err; ^

Error: Cannot find module 'sqlite3' at Function.Module.resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module.load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (C:\casadocodigo\src\config\database.js:1:79) at Module.compile (internal/modules/cjs/loader.js:701:30) at Object.Module.extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) [nodemon] app crashed - waiting for file changes before starting...

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software