Ionic Appflow构建失败,并显示“权限被拒绝”

时间:2019-04-24 21:17:41

标签: ionic-framework ionic4 ionic-appflow

我正在尝试在Ionic Appflow上构建我的项目,但是以下操作始终失败。我不了解可能会出错,因为我可以在本地生成和构建。

还有其他人遇到过此类问题吗?

sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! aardraapp@0.0.1 build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the aardraapp@0.0.1 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)
> aardraapp@0.0.1 build /builds/aardrasystems/app
> ng build
sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! aardraapp@0.0.1 build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the aardraapp@0.0.1 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

1 个答案:

答案 0 :(得分:1)

如果您在Windows中进行了该项目,则可能是所生成文件的权限错误。为什么AppFlow将Unix操作系统用于Android。

您必须通过GIT授予权限:

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