Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Erro ao executar npm install na pasta API do projeto Gatitobook - Angular

Estou usando macbook M1 (MacOs 12.3). Versão do NPM 8.5.5, versão do node v16.14.2. Ao rodar o comando npm install dentro da pasta API ocorre o erro. Alguém pode me ajudar? Acredito que seja algo relacionado a permissão porem meu usuario ja e adm, alem de eu ter colocado SUDO no inicio do comando.

rhaynnerliberato@MacBook-Pro-de-Rhaynner api % sudo npm install Password: npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm WARN deprecated cryptiles@4.1.3: This module has moved and is now available at @hapi/cryptiles. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated boom@7.3.0: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future npm ERR! code 1 npm ERR! path /Users/rhaynnerliberato/Downloads/angular_formularios-main/api/node_modules/sqlite3 npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/rhaynnerliberato/Downloads/angular_formularios-main/api/node_modules/sqlite3/lib/binding/node-v93-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/rhaynnerliberato/Downloads/angular_formularios-main/api/node_modules/sqlite3/lib/binding/node-v93-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0 npm ERR! node-pre-gyp info using node@16.14.2 | darwin | arm64 npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "/Users/rhaynnerliberato/Downloads/angular_formularios-main/api/node_modules/sqlite3/lib/binding/node-v93-darwin-arm64/node_sqlite3.node" (not found) npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-arm64.tar.gz npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-arm64.tar.gz npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-arm64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-arm64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.14.2 | darwin | arm64 npm ERR! gyp info ok

2 respostas
solução!

Consegui resolver. -Istalar o brew; -instalar o rosetta; -criar uma copia do terminal; -entrar em informacoes no novo terminal e marcar abrir com rosetta; -abrir o novo terminal e rodar brew install npm;

Oi Rhaynner, tudo bem?

Que bom que conseguiu resolver e muito obrigada por postar aqui a solução, pode ajudar outras pessoas estudantes. :D

Um abraço e bons estudos.