I have a problem with the path when downloaded packages on visual studio code. What the way to solve this problem?

Viewed 44

When I install any packages in terminal of VSCODE, I can't use the command of packages directly instead of I have to add the path of package executor behind each command. Example:

  • I have downloaded Nodemon package for my project and I use its command in terminal like this:

"C:\Users\ACER\AppData\Roaming\npm\nodemon --inspect src/index.js"

Instead of using ( _name_Package + command -> nodemon --inspect src/index.js) as usual. I have tried many ways "add variables environment" or reinstall with different options but failed. Please help me if you have solutions. THANK YOU !!!

1 Answers

Most probably C:\Users\ACER\AppData\Roaming\npm is not added to the Path environmental variable. Please try to add C:\Users\ACER\AppData\Roaming\npm. Note that the edited Path won't be available in already opened terminal sessions, so please close them and try the command after reopening the commend line. If it does not help, please try to restart the computer.

Related