npm install -g phonegap

After Installing NodeJs and running npm install -g phonegap I get a result that is in a completely different format than it should be:

C:\Program Files\nodejs>npm install -g phonegap |

ws@0.4.31 install C:\Users\Aashubhai\AppData\Roaming\npm\node_modules \phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engi ne.io\node_modules\ws

(node-gyp rebuild 2> builderror.log) || (exit 0)

Please suggest if there any other workaround. Tired of this error from past 3 days. no luck in installing phonegap.

Path variable had to be updated with C:\Windows\System32 and it installed phonegap.