Ao executar o comando
npm install --save-dev nodemon
cria a dependencia no meu arquivo .json
{
"name": "projeto-node-js-rest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Diego Brito",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"nodemon": "^2.0.7"
}
}
mas ao executar o comando "npm star", no terminal me retornar este erro
> projeto-node-js-rest@1.0.0 start /home/diego/Documentos/GitHub/Cursos-Exercicios/CURSOS/ALURA/JAVASCRIPT/Rest com NodeJS: API com Express e MySQL
> nodemon index.js
sh: 1: nodemon: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! projeto-node-js-rest@1.0.0 start: `nodemon index.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the projeto-node-js-rest@1.0.0 start 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/diego/.npm/_logs/2021-05-08T20_53_25_541Z-debug.log
como faço para solucionar este erro ?
já tentei instalar o pacote do nodemon de forma global, mas é retornado o msm erro ...