How add commands to cygwin - npm How add commands to cygwin - npm unix unix

How add commands to cygwin - npm


This seems to be a problem with the npm script as mentioned here, https://github.com/joyent/node/issues/5912

Assuming you have installed nodejs in the default location you can run the following dos2unix command and fix the error.

dos2unix c:/Program\ Files/nodejs/npm

This fixed my problems with the npm script.


How to make cygwin work with npm command

  1. install http://nodejs.org/#download
  2. download http://nodejs.org/dist/npm/
  3. extract npm.zip into node.exe
  4. run cygwin terminal again

That is it!


In order to fix the npm script to work even with dos encoding, i submitted a patch.