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

rodei o npm install mas não funcionou tentei instalar algumas dependências mas também deu erro.

sqlite3@4.1.1 install /home/anderson/Documents/Faculdade/Git/Fetch API: Consumindo uma API Rest com JavaScript/server-petshop/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

sh: node-pre-gyp: command not found npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! sqlite3@4.1.1 install: node-pre-gyp install --fallback-to-build npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the sqlite3@4.1.1 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! /home/anderson/.npm/logs/2020-06-12T0209_21_339Z-debug.log [anderson@archlinux server-petshop]$

3 respostas

Oi, Anderson, tudo bem?

Qual a versão do seu node? Você fez o passo a passo de adicionar a pasta server-petshop dentro da pasta fetch-api e navegar até a server-petshop roda o comando npm i e depois npm start ? Segue um print do meu teste.

estou usando a v12.17.0 (LTS), estou achando que o problema pode ser com o sqlite , uso o arch linux como SO.

[anderson@archlinux server-petshop]$ npm install

sqlite3@4.1.1 install /home/anderson/Documents/Faculdade/Git/Fetch API: Consumindo uma API Rest com JavaScript/server-petshop/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

sh: node-pre-gyp: command not found npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! sqlite3@4.1.1 install: node-pre-gyp install --fallback-to-build npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the sqlite3@4.1.1 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! /home/anderson/.npm/logs/2020-06-12T1818_34_033Z-debug.log

solução!

conseguir removendo a pasta node_modules e o arquivo package-lock.json

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software