3

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 ?

1 Answer 1

5

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
1
  • Or convert the line endings by opening the file in Notepad++, Edit menu > EOL Conversion > Macintosh (CR)
    – andreszs
    Commented Jul 19, 2017 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.