Windows 10 Node v8.1
The project's package.json file consists of a "scripts" object which contains a "start" script that attempts to load nodemon.js from './node_modules/nodemon/bin/nodemon.js', but I keep getting this error that "." is not recognized as an internal or external command, operable program, or batch file.
I believe it has something to do with my environment variables, but I'm still confused. Do I need to add a path to my project's node_modules directory in my PATH environment variable?
Thanks in advance.
It's enough to use
"start": "nodemon"
When you run npm scripts it will automatically add the node_modules/.bin/ folder to the PATH. In that folder there is a script called nodemon.cmd that points to the proper nodemon folder and runs nodemon correctly.
The answer to the question in the title can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With