user8400863
user8400863

Reputation: 745

Ionic Appflow build fails with "Permission denied"

I am trying to build my project on Ionic Appflow, but it keeps failing with the following. I do not understand what could be wrong as I can locally generate and build locally.

Has anybody else experienced such issues?

sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-04-24T20_45_42_679Z-debug.log
+------+---------------------+-------------+
| fastlane summary |
+------+---------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------+-------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 2 |
| 3 | add_git_credentials | 0 |
| 4 | modify_config_xml | 0 |
| 💥 | build_pro_app | 17 |
+------+---------------------+-------------+
[20:45:42]: fastlane finished with errors
/usr/local/bin/fastlane: [!] Exit status of command 'npm run build' was 126 instead of 0.
(FastlaneCore::Interface::FastlaneShellError)
> [email protected] build /builds/aardrasystems/app
> ng build
sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-04-24T20_45_42_679Z-debug.log
Running after script...
$ run "clean-up"
ERROR: Job failed: command terminated with exit code 1

Upvotes: 2

Views: 861

Answers (1)

JorgeParada
JorgeParada

Reputation: 603

If you did the project in Windows, it is possible that it is a permission error on the generated files. Why AppFlow uses a Unix OS for Android.

You have to give it permissions through GIT:

https://ionic.zendesk.com/hc/en-us/articles/360000160067-Adding-execute-permissions-using-git

Upvotes: 1

Related Questions