A executar código
npm install
aparece o erro no console
gui@pop-os:~/Área de Trabalho/Alura/Angular/Angular parte1: fundamentos/api$ npm install
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 har-validator@5.1.5: this library is no longer supported
> sqlite3@4.2.0 install /home/gui/Área de Trabalho/Alura/Angular/Angular parte1: fundamentos/api/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: not found
npm WARN alurapic@1.0.0 No description
npm WARN alurapic@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
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! /home/gui/.npm/_logs/2021-01-18T06_03_39_519Z-debug.log
Já tentei mudar a versão do node para v8.17.0, v12.20.1, v14.15.4 e v15.3.0
Deletar o package-lock.json
apagar o node_modules
Alterar a versão do sqlite3 em package.json
{
"name": "alurapic",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.2",
"cors": "^2.8.4",
"express": "^4.16.3",
"jimp": "^0.2.28",
"jsonwebtoken": "^8.2.0",
"multer": "^1.3.0",
"sqlite3": "^5.0.0",
"uuid": "^3.2.1"
}
}
- rodei os comandos
e em seguidanpm uninstall sqlite3
mais o erro persistiu só mudou a versão nas msg de errosnpm install sqlite3