我想从 https://market.ionic.io/starters/nearme 构建项目 当尝试 gulp --cordova“准备”时,此错误始终显示:
Error: Hook failed with error code 127: projectname/app/hooks/after_prepare/update_platform_config.js
我有来自 here 的尝试答案, 但它显示相同的错误,任何人都可以帮忙吗?
最佳答案
这是由于 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
关于cordova - ionic 框架 gulp --cordova "prepare"失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33827861/