I have installed nodemon by: sudo npm install -g nodemon. With MacOS Terminal, i can run nodemon command. But in Integrated Terminal of Visual Studio Code, I can't run nodemon and I don't know why. Maybe two terminals don't sync ? Help me, please.
4 Answers
In my case
- changed the default shell from Powershell to CMD
- restart VSCode.
VSCode now started with cmd chosen as the default, and the problem didn't happen with cmd.

- 2,093
- 1
- 25
- 29
Shutdown VS Code and launch it again from the command line with 'code .'.
Above approach should fix the issue. Sometime when we install node after installing visual studio some sort of environment variable path issue happens.

- 102
- 9
-
Are you able to check node version from inside vs terminal ? – Anubhav Gupta Feb 25 '18 at 17:54
-
Yes. I can check my node version from inside vs terminal – Thuần Nguyễn Feb 26 '18 at 09:22
Looks like this has been asked by others. But here is a possible solution. In you package.json edit scripts:
"scripts": {
"serve": "nodemon server.js"
},
then npm run serve
You can also check you bash profile
if nodemon is not being found by bash.
~/.bash_profile
add
PATH=$PATH:/usr/local/bin/bin/
Check this solution
and this discussion here

- 2,866
- 2
- 18
- 25
I was also facing a similar problem for a long time during my web development. If you are also facing these problem in VS code, so I recommend you to install Powershell Extention in your vs code or update your Powershell Extention. And restart your vs code.

- 1
- 1