There are two ways for you to solve the problem. The first is you install the library nodemon
through the command npm install -g nodemon
.
You can also make the installation as a development dependency for the project (npm install nodemon --save-dev
) and in the file scripts section package.json
put the instruction down:
...
"scripts": {
...
"dev": "nodemon src/index.js"
...
}
...
Note: the ... are to demonstrate that not only can but also that there must be contents of the archive before and after the instructions.
After installing the package and placing the above instruction in the package.json
, just execute the command npm run dev
. I would like to say that this second option, I like very much, because in executing the npm install
the system will also already make the installation of all dependencies for the development of the project.
I noticed that you make use of the yarn
it is possible that you already have these steps performed. Try running a yarn install
and then run the command again.
Looks like you don’t have the
nodemon
installed. It should be installed?– Woss
npm i -g nodemon
– Sorack
@Andersoncarloswoss and @Sorack he makes use of Yarn, I believe the
yarn install
would already solve. @Juarezsimone can add to doubt the contents of yourpackage.json
? I put an answer with some options (including npm).– Hiago Souza