【发布时间】:2020-04-29 16:27:41
【问题描述】:
我正在尝试将我的 reactJs 应用程序部署到 Amplify。我将我的 Github 连接到 Amplify。在部署期间,它在构建步骤显示以下错误:
2020-01-07T19:35:22.127Z [INFO]: Failed to compile.
2020-01-07T19:35:22.129Z [INFO]: ./src/index.js
Cannot find file './aws-exports' in './src'.
2020-01-07T19:35:22.149Z [WARNING]: error Command failed with exit code 1.
2020-01-07T19:35:22.150Z [INFO]: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2020-01-07T19:35:22.155Z [ERROR]: !!! Build failed
2020-01-07T19:35:22.239Z [ERROR]: !!! Non-Zero Exit Code detected
2020-01-07T19:35:22.239Z [INFO]: # Starting environment caching...
发生这种情况是因为 .gitignore 忽略了 aws-exports。
有人可以在不提交 aws-exports 的情况下告诉我这个问题的解决方案是什么吗?
【问题讨论】:
-
如果找不到aws-exports,请尝试使用(放大拉)github.com/aws-amplify/amplify-cli/issues/186
标签: reactjs amazon-web-services serverless aws-amplify