3
respostas

[Bug] ERRO AO TENTAR INSTALAR O ALURAPIC

Ao tentar instalar o alura pic tenho o seguinte erro no cmd:

npm ERR! code 1 npm ERR! path C:\Users\yasmincampos\Desktop\alurapic-main\alurapic-main\alurapic\alurapic\node_modules\sqlite3 npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\yasmincampos\Desktop\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\yasmincampos\Desktop\alurapic-main\alurapic-main\alurapic\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\yasmincampos\Desktop\alurapic-main\alurapic-main\alurapic\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10 npm ERR! node-pre-gyp info using node@16.13.1 | win32 | x64 npm ERR! node-pre-gyp info check checked for "C:\Users\yasmincampos\Desktop\alurapic-main\alurapic-main\alurapic\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.6/napi-v6-win32-unknown-x64.tar.gz npm ERR! node-pre-gyp ERR! install request to https://objects.githubusercontent.com/github-production-release-asset-2e65be/1367055/3a2d6cf2-c403-4fdc-a52c-b076ec1160a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230917T201634Z&X-Amz-Expires=300&X-Amz-Signature=0d906384386c684753469614932b164f99d83376c23f93830d02968a5c38607c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=1367055&response-content-disposition=attachment%3B%20filename%3Dnapi-v6-win32-unknown-x64.tar.gz&response-content-type=application%2Foctet-stream failed, reason: self signed certificate in certificate chain npm ERR! node-pre-gyp WARN Pre-built binaries not installable for sqlite3@5.1.6 and node@16.13.1 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error request to https://objects.githubusercontent.com/github-production-release-asset-2e65be/1367055/3a2d6cf2-c403-4fdc-a52c-b076ec1160a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230917%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230917T201634Z&X-Amz-Expires=300&X-Amz-Signature=0d906384386c684753469614932b164f99d83376c23f93830d02968a5c38607c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=1367055&response-content-disposition=attachment%3B%20filename%3Dnapi-v6-win32-unknown-x64.tar.gz&response-content-type=application%2Foctet-stream failed, reason: self signed certificate in certificate chain npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.3.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.3.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if Python is C:\Users\yasmincampos\AppData\Local\Programs\Python\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Users\yasmincampos\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\yasmincampos\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\yasmincampos\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run

3 respostas

Olá, Yasmin! Tudo bem?

Pelo que pude observar, o erro que você está enfrentando está relacionado ao pacote sqlite3 e ao Python.

O erro "self signed certificate in certificate chain" pode ser resolvido configurando o npm para permitir pacotes autoassinados. Você pode fazer isso executando o seguinte comando no terminal:

npm config set strict-ssl false

Depois tente instalar o alurapic novamente.

Quanto ao erro do Python, parece que o node-gyp (uma dependência do sqlite3) não conseguiu encontrar o Python em seu sistema. Você precisa ter o Python instalado para compilar alguns pacotes.

Você pode baixar o Python no site oficial (https://www.python.org/downloads/). Após a instalação, adicione o Python ao seu PATH. Isso pode ser feito durante a instalação do Python, marcando a opção "Add Python to PATH" antes de clicar em "Install Now".

Depois de instalar o Python, você pode configurar o npm para usar a versão correta do Python (se você tiver mais de uma versão instalada) com o seguinte comando:

npm config set python python2.7

Substitua "python2.7" pela versão do Python que você instalou.

Espero que essas sugestões possam te ajudar a resolver o problema. Lembre-se de que essas são sugestões e podem não resolver completamente o seu problema, pois existem muitos fatores que podem estar causando esses erros.

Espero ter ajudado e bons estudos!

óla Matheus, tudo bem ? Desde já, muito obrigada pela tentativa de ajuda. O erro do phyton realmente não ocorre mais, porem ainda não consegui instalar mesmo executando o comando que você mandou o erro agora:

npm ERR! code 1 npm ERR! path C:\Users\yasmincampos\Desktop\alurapic\node_modules\sqlite3 npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\yasmincampos\Desktop\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\yasmincampos\Desktop\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\yasmincampos\Desktop\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10 npm ERR! node-pre-gyp info using node@16.13.1 | win32 | x64 npm ERR! node-pre-gyp info check checked for "C:\Users\yasmincampos\Desktop\alurapic\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\node_sqlite3.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.6/napi-v6-win32-unknown-x64.tar.gz npm ERR! node-pre-gyp ERR! install request to https://objects.githubusercontent.com/github-production-release-asset-2e65be/1367055/3a2d6cf2-c403-4fdc-a52c-b076ec1160a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230918%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230918T224708Z&X-Amz-Expires=300&X-Amz-Signature=afa4bf9b961b5c2832d73c6867315aa7ead85c4a02c7714b6eaf6cb3be17b02e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=1367055&response-content-disposition=attachment%3B%20filename%3Dnapi-v6-win32-unknown-x64.tar.gz&response-content-type=application%2Foctet-stream failed, reason: self signed certificate in certificate chain npm ERR! node-pre-gyp WARN Pre-built binaries not installable for sqlite3@5.1.6 and node@16.13.1 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error request to https://objects.githubusercontent.com/github-production-release-asset-2e65be/1367055/3a2d6cf2-c403-4fdc-a52c-b076ec1160a6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230918%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230918T224708Z&X-Amz-Expires=300&X-Amz-Signature=afa4bf9b961b5c2832d73c6867315aa7ead85c4a02c7714b6eaf6cb3be17b02e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=1367055&response-content-disposition=attachment%3B%20filename%3Dnapi-v6-win32-unknown-x64.tar.gz&response-content-type=application%2Foctet-stream failed, reason: self signed certificate in certificate chain npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.3.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.3.0 npm ERR! gyp info using node@16.13.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.11.5 found at "C:\Users\yasmincampos\AppData\Local\Programs\Python\Python311\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\yasmincampos\Desktop\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) npm ERR! gyp ERR! stack at C:\Users\yasmincampos\Desktop\nvm\v16.13.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16

Olá! Estou enfrentando o mesmo problema com "self signed certificate in certificate chain". A solução proposta de rodar o comando "npm config set strict-ssl false", não causa vulnerabilidade ao sistema?

Obrigada.