Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

windows - The term 'node' is not recognized... In Powershell

I have been trying to resolve this issue for the whole day.

When I run node -v or npm install in cmd prompt, it works absolutely fine. But when I run the same commands in Powershell, it gives the following error:s

PS C:UsersAnubhav.Trivedi> node -v
The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:5
+ node <<<<  -v
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I tried uninstalling node js and reinstalling it. Added node js path C:Program Files (x86) odejs to enviroment variables (system variables). Restarting computer. But nothing seems to work. Kindly let me know, what am I missing here.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

These issues cannot be installed from the Package Manager console, so I had to browse lot of things to fix the issues and finally I got the solution.

Maybe we followed these scenarios

  • Missing Node.js software

  • Wrongly updated Windows environment path

  • Installed in the wrong path

  • Old version of Node.js software

You can download the latest Node.js software here.

Update Path

After installation, automatically create nodejs folder in this path “C:Program Files (x86)” or “C:Program Files “.

Open Control Panel -> User Accounts -> Change my environmental variable and verify the path Variable value “C:Program Files (x86) odejs” or “C:Program Files odejs “.

new => user = path => value = C:Program Files (x86) odejs and after apply that.

and close Editor and restart it. it will work correctly.

note :- enter your path instead of copy of this path.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...