Reputation: 1613
I want to build project from https://market.ionic.io/starters/nearme when try to gulp --cordova "prepare", this error always show :
Error: Hook failed with error code 127: projectname/app/hooks/after_prepare/update_platform_config.js
I have try answer from here, but it show same error, anybody can help ?
Upvotes: 3
Views: 2257
Reputation: 2510
This is due to OSX ^M line endings.
Fix:
# 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
Upvotes: 5