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
452 views
in Technique[技术] by (71.8m points)

windows - 'node' is not recognized as an internal or external command

I've been working with node.js v0.6.3, locally installed on Windows Vista at C:Program FilesNodejs. I recently upgraded to (by running the installer for) v0.6.6. It seemed like it worked for a while, but now if I try to run node from any directory I get a

'node' is not recognized as an internal or external command

message, though running node from C:Program FilesNodejs does work.

I tried rebooting, removing node, reinstalling, reinstalling 0.6.3 - nothing seems to work. I just don't get why node fails to recognize system path, though node works from its base dir?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Node is missing from the SYSTEM PATH, try this in your command line

SET PATH=C:Program FilesNodejs;%PATH%

and then try running node

To set this system wide you need to set in the system settings - cf - http://banagale.com/changing-your-system-path-in-windows-vista.htm

To be very clean, create a new system variable NODEJS

NODEJS="C:Program FilesNodejs"

Then edit the PATH in system variables and add %NODEJS%

PATH=%NODEJS%;...

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

2.1m questions

2.1m answers

60 comments

57.0k users

...