3
respostas

erro ao iniciar projeto (npm i)

Já no inicio apresenta erro na pasta de api. Já tentei todos os anterios comentários porém não houve sucesso. Se alguém souber fico muito agradecido.

gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:397:5)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
gyp ERR! System Windows_NT 10.0.19043
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\\jorge.ribeiro\\Desktop\\angular_formularios-main\\api\\node_modules\\sqlite3\\lib\\binding\\node-v83-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\jorge.ribeiro\\Desktop\\angular_formularios-main\\api\\node_modules\\sqlite3\\lib\\binding\\node-v83-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" "--python=C:\\Python27"
gyp ERR! cwd C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3
gyp ERR! node -v v14.17.6
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 configure --fallback-to-build --module=C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Python27' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19043
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jorge.ribeiro\\Desktop\\angular_formularios-main\\api\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3
node-pre-gyp ERR! node -v v14.17.6
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\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\jorge.ribeiro\Desktop\angular_formularios-main\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Python27' (1)
npm WARN gatitobook@1.0.0 No description
npm WARN gatitobook@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.2.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\jorge.ribeiro\AppData\Roaming\npm-cache\_logs\2021-11-23T04_18_07_467Z-debug.log
3 respostas

Oi Jorge!

Pelos erros que você postou, o culpado provavelmente é alguma coisa relacionada ao sqlite3.

Siga os seguintes passos:

  1. Delete a pasta node_modules dentro de /api
  2. Abra o arquivo package.json e delete a linha referente ao sqlite3. Salve o arquivo.
  3. Delete o arquivo package-lock.json
  4. Verifique se você está dentro da pasta api no terminal
  5. Instale novamente o sqlite3 com o comando
    npm i sqlite3
  6. Rode npm install novamente

Se o erro persistir, por favor comente aqui. Espero ter ajudado!

Bom dia Eduardo !!! Como vai ? Agradeço a força ajudou bastante , tinha problema também com o python porém foi resolvido. Muito obrigado.

Olá meninos!

Eduardo, você me ajudou demais com a dúvida do Jorge.

Obrigada pela explicação detalhada.

:)