I’m running on Windows 7 and have node installed fine with cygwin. I am following along on the how to on mcmahon’s website for nodeunit: http://caolanmcmahon.com/posts/unit_testing_in_node_js .
I used npm to install nodeunit and it said it had installed fine but when I go to invoke it, nodeunit, it says command not found in all the different directories.
Do I have to set some kind of path variable maybe?
In Windows 7
You should install your
nodeunitglobally with the-gflagCheck your
PATHby typing thePATHcommand in windows console. If you dont find theC:\Users\Username\AppData\Roaming\npm;value, you should check your environment variables, and if not containing, add it manually (replace theUsernameto your username).But I think node installer adds it automatically.
In XP
The
AppData\Roamingfolder in Windows Vista or Windows 7 is the same as theDocuments and Settings\username\Application Datafolder in Windows XP.So your variable should look like
C:\Documents and Settings\Username\Application Data\npm;