env: node\r: 没有这样的文件或目录与 browserify-rails

env: node\r: No such file or directory with browserify-rails

一切顺利。想使用 ios 模拟器,但 xcode 想更新。为什么不?做过某事。一切都好。完成 git 添加、提交和合并。合并后:

Error while running /Users/sylar/Sites/rails/demo/node_modules/.bin/browserifyinc --transform reactify --extension=".jsx" --list --cachefile=/Users/sylar/Sites/rails/demo/tmp/cache/browserify-rails/browserifyinc-cache.json -o "/Users/sylar/Sites/rails/demo/tmp/cache/browserify-rails/output20160319-1425-142q6j7" -:

env: node\r: No such file or directory

我在 Mac 10.11.13

运行 这些命令但没有任何改变:rake tmp:cache:clearrm -rf ./tmp

听说问题是由 git 提交引起的,但不确定它何时起作用。我所做的只是更新 xcode 然后 git 合并。在最后一个工作分支上签出但同样的问题。

您在脚本文件 上有一个以 shebang line of your script (\r\n instead of \n, and that may have been replicated on other lines as well); execute fromdos 结尾的 dos 行,您可以使用 tr 之类的

tr -d '5' < scriptfile > scriptfile.new

然后

mv scriptfile.new scriptfile