Reputation: 11
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.
Upvotes: 1
Views: 3982
Reputation: 1
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.
Upvotes: 0
Reputation: 2193
In my case
VSCode now started with cmd chosen as the default, and the problem didn't happen with cmd.
Upvotes: 2
Reputation: 3046
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
Upvotes: 1
Reputation: 102
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.
Upvotes: 1