After installing nodejs, use the node command in powershell to report an error

After installing nodejs, node can be started normally in cmd, but the following error occurs in powershell:

Solution: Right-click on the computer , open Properties, click Advanced System Settings, and then open Environment Variables, as shown in the figure below:

Then click New in the system variable below , and add the variable as shown in the figure below:

Then edit the Path , add the variable as shown in the figure below, then click OK, and reopen powershell to solve the problem.

If the error is still reported and the following prompt appears, restart the computer to solve it.

Guess you like

Origin blog.csdn.net/qq_35408366/article/details/128802373