Nodemon inspect/debug not working?
Solution 1
SOLVED,
It seems like [email protected]
was not passing in this argument. There is a newer version available 1.12.7
where everything works fine and well.
Answer source: Nodemon Issues - Github
Solution 2
For people coming from search engines, there could be a bug related to nodemon and ts-node.
Error: Unknown or unexpected option: --inspect
This can be a way to use inspect with nodemon:
nodemon --exec 'node --inspect=0.0.0.0:9229 --require ts-node/register src/index.ts'
For more information see here
Solution 3
nodemon --inspect app.js
The .js part is absolutely necessary.
Solution 4
FINALLY SOLVED
Just follow the below steps are you're good to go:
Make sure you have updated version of nodemon. Update is using following command:
npm i [email protected] -g
. Make sure to use-g
(to give nodemon permissions to run as an administrator). If you get some warnings, try running the same with sudo commandsudo npm i [email protected] -g
Then execute the command as:
nodemon --inspect app.js
I hope it helped..!!
Pramesh Bajracharya
I'm a Software Engineer. Full Stack Developer with some machine learning skills. Working with: JavaScript Python Java
Updated on July 29, 2020Comments
-
Pramesh Bajracharya almost 4 years
Running
nodemon --inspect index.js
ornodemon --debug index.js
doesn't work.Node Version : 8.9.1
Nodemon Version : 1.12.6
I have tried these with no luck :
nodemon --inspect-brk index.js
nodemon -- --inspect index.js
nodemon index.js -- --inspect index.js
nodemon index.js -- --debug index.js
nodemon -- --debug index.js
nodemon --inspect --debug index.js
nodemon --debug-brk index.js
But
node --inspect index.js
ornode --inspect-brk index.js
works. I wonder how? If any alternatives or some kinda workaround would be great too.Please comment if you need further description.