4
respostas

Erro no npm install na Api

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! alurapic@1.0.0 start: node server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the alurapic@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Tania Ramalho\AppData\Roaming\npm-cache_logs\2021-03-06T1 2_51_16_334Z-debug.log

4 respostas

Fala ai Diego, tudo bem? Nesses logs que você compartilhou não da para pegar muito contexto sobre o erro, consegue postar o log completo?

Fico no aguardo.

Tenho o mesmo erro nas instruções da página: https://cursos.alura.com.br/course/angular-fundamentos/task/38530

npm install

sqlite3@4.0.0 install D:\Source\appAngular\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.15.5 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) Compilando os projetos desta solução um de cada vez. Para habilitar o build paralelo, adicione a opção "/m". C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v1 40') cannot be found. To build using the v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\Source\appAngular\api\node_modules\sqlite3\build\deps\action_before_build.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/childprocess.js:277:12) gyp ERR! System Windows_NT 10.0.18363 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64" "--napi_version=7" "--node_abi_napi=napi" gyp ERR! cwd D:\Source\appAngular\api\node_modules\sqlite3 gyp ERR! node -v v14.15.5 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\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess. (D:\Source\appAngular\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: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 (internal/childprocess.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.18363 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\Source\appAngular\api\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd D:\Source\appAngular\api\node_modules\sqlite3 node-pre-gyp ERR! node -v v14.15.5 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:\Users\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\Source\appAngular\api\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=7 --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\Walter\AppData\Roaming\npm-cache_logs\2021-03-11T12_17_11_316Z-debug.log

O log referido na mensagem é muito grande para colocar aqui. Segue só o seu final, com o erro: 1150 warn alurapic@1.0.0 No description 1151 warn alurapic@1.0.0 No repository field. 1152 verbose stack Error: sqlite3@4.0.0 install: node-pre-gyp install --fallback-to-build 1152 verbose stack Exit status 1 1152 verbose stack at EventEmitter. (C:\Users\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 1152 verbose stack at EventEmitter.emit (events.js:315:20) 1152 verbose stack at ChildProcess. (C:\Users\Walter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 1152 verbose stack at ChildProcess.emit (events.js:315:20) 1152 verbose stack at maybeClose (internal/child_process.js:1048:16) 1152 verbose stack at Process.ChildProcess.handle.onexit (internal/childprocess.js:288:5) 1153 verbose pkgid sqlite3@4.0.0 1154 verbose cwd D:\Source\appAngular\api 1155 verbose Windows_NT 10.0.18363 1156 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Walter\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" 1157 verbose node v14.15.5 1158 verbose npm v6.14.11 1159 error code ELIFECYCLE 1160 error errno 1 1161 error sqlite3@4.0.0 install: node-pre-gyp install --fallback-to-build 1161 error Exit status 1 1162 error Failed at the sqlite3@4.0.0 install script. 1162 error This is probably not a problem with npm. There is likely additional logging output above. 1163 verbose exit [ 1, true ]

Tente seguir o que está aqui neste link: https://cursos.alura.com.br/forum/topico-erro-ao-executar-o-npm-install-147824