Ionic Framework gulp --cordova“准备”失败

时间:2015-11-20 13:24:59

标签: cordova ionic-framework

我想从https://market.ionic.io/starters/nearme构建项目 当试图gulp --cordova“准备”时,这个错误总是显示:

  

错误:Hook失败,错误代码为127:projectname / app / hooks / after_prepare / update_platform_config.js

我已尝试从here回答,但它显示相同的错误,任何人都可以提供帮助吗?

1 个答案:

答案 0 :(得分:5)

这是由于OSX ^ M行结尾。

修正:

# check if the file has ^M line endings
cat -v FILE-NAME-WITH-ERROR

# fix the file
tr -d '\r' < FILE-NAME-WITH-ERROR > FILE-NAME-WITH-ERROR.fix

# check if problem fixed in resulting file from above
cat -v FILE-NAME-WITH-ERROR.fix

# overwrite original file with fixed file
mv FILE-NAME-WITH-ERROR.fix  FILE-NAME-WITH-ERROR