1
resposta

Erro na instalação dependências da API.

Comecei o curso de Formação de Angular. Mas em uma parte do curso, já ocorreu erro na instalação dependências da API.

Esse é erro: C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api>npm install

sqlite3@4.0.0 install C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3 node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v83-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for sqlite3@4.0.0 and node@14.8.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. unpack_sqlite_dep TRACKER : error TRK0005: Failed to locate: "CL.exe". O sistema não pode encontrar o arquivo especificado. [C:\Users\ant onio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\build\deps\sqlite3.vcxproj]

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:194:23) gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/childprocess.js:276:12) gyp ERR! System Windows_NT 10.0.17134 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=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64" "--napi_version=6" "--node_abi_napi=napi" gyp ERR! cwd C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3 gyp ERR! node -v v14.8.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 '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=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=6 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1051:16) node-pre-gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/childprocess.js:287:5) node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3 node-pre-gyp ERR! node -v v14.8.0 node-pre-gyp ERR! node-pre-gyp -v v0.9.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 build --fallback-to-build --module=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\antonio.cruz\Desktop\Curso Alura Totvs\Angular\projetoangular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=6 --node_abi_napi=napi' (1) npm WARN alurapic@1.0.0 No description npm WARN alurapic@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.0.0 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.0.0 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\antonio.cruz\AppData\Roaming\npm-cache_logs\2020-10-07T02_14_01_120Z-debug.log

Acho que é o pacote do Sqlite3 que esta ocorrendo esse problema, como devo proceder para dar continuidade ao curso?

1 resposta

Fala ai Antonio, tudo bem? Tente fazer o seguinte:

  1. Apagar a pasta node_modules
  2. Apagar arquivo package-lock.json
  3. Instalar a biblioteca sqlite3: npm i sqlite3
  4. Instalar as demais dependências: npm i.

Isso deve resolver.

Espero ter ajudado.