简体   繁体   中英

How to run node commands from vscode

I've installed node and npm. I'm able to run node apps from Windows cmd but when I try using the vscode terminal, it says node is not recognized as an internal or external command. Please help me fix this

In Windows, you need to set the node.js folder path into system variables or user variables.

  1. open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables

  2. in "User variables" or "System variables" find variable PATH and add node.js folder path as value. Usually it is C:\\Program Files\\nodejs; . If a variable doesn't exist, create it.

  3. Restart your IDE or computer.

It is useful to add also "npm" and "Git" paths as variable, separated by a semicolon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM