env: node\r: No such file or directory Error: Hook failed error code 127 osx

If your getting the error message env: node\r: No such file or directory Error: Hook failed with error code 127 while trying to build your Ionic or Cordova application under OSX it's most likely due to the line ending format in the file in question.

The simplest way is to use dos2unix utility (can be install with brew install unix2dos), simply put it will covert the file from the Windows \r\n format to the Unix based \n.

For example if your have an issue with 010_add_platform_class.js you would simple run :-

unix2dos 010_add_platform_class.js
Filed under: Ionic, Cordova  Tags: Ionic

0 Responses to “env: node\r: No such file or directory Error: Hook failed error code 127 osx”

Sorry, comments have been closed for this post.