Amplify 拒绝从 git 存储库构建我的 web 应用程序,并且不会在日志中抛出任何错误,甚至不会抛出编译失败的原因。然而,我可以在本地构建它,然后上传已经构建的网络应用程序来放大(并且它可以工作)。我的构建配置 Amplify.yml:version: 1applications: - frontend: phases: preBuild: commands: - npm ci - npm install --global npm@latest build: commands: - npm run build artifacts: baseDirectory: build files: - '**/*' appRoot: webapp这是我的 package.json 以及所有依赖项:{ "name": "architectui-react-pro", "version": "1.6.0", "private": true, "description": "My Descritpion", "author": "Me", "repository": { "type": "git", "url": "git+https://github.com/dpackdev/architectui-react-pro" }, "dependencies": { "@amcharts/amcharts4": "^4.9.30", "@fortawesome/fontawesome-svg-core": "^1.2.25", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.4", "@material-ui/core": "^4.11.0", "@mrblenny/react-flow-chart": "0.0.12", "@types/googlemaps": "^3.38.0", "@types/markerclustererplus": "^2.1.33", "animate-sass": "^0.8.2", "apexcharts": "^3.8.6", "aws-amplify": "^3.3.8", "aws-amplify-react": "^4.2.12", "axios": "^0.21.0", "classnames": "^2.2.6", "d3": "^5.16.0", "jquery": "^3.4.1", "jw-react-pagination": "^1.1.0", "loaders.css": "^0.1.2", "node-sass": "^4.13.0", "ol": "^5.3.1", "pe7-icon": "^1.0.4", "rc-tabs": "^9.6.7", "react": "^16.13.1", "react-apexcharts": "^1.3.3", "react-app-polyfill": "^1.0.4", "react-burgers": "^1.3.0", "react-circle": "^1.1.1", "react-countup": "^4.2.2", "react-d3-graph": "^2.5.0", "react-dom": "^16.12.0", },以前有人遇到过这个问题吗?我该如何解决?
3 回答
慕田峪7331174
TA贡献1828条经验 获得超13个赞
我也遇到过同样的编译器失败。这是因为我重命名了路径之一中包含的文件夹名称之一,我已将 Yyyy 文件夹名称重命名为 yyyy。显然 codecommit 无法解决这个问题。
例如:从 './xxx/Yyyy/zzz.js' 导入视频;
弑天下
TA贡献1818条经验 获得超8个赞
也有这个问题,一切都很好,然后我对我的应用程序做了一些更改并将其重新部署到 GitHub,Amplify 一直说“ Failed to compile
”。
问题是我重命名了一个文件,并且更改是区分大小写的(a bout.js => A bout.js ),而我的 git 没有提交该更改(因为它只是区分大小写的更改..)。
我建议你 git pull 项目(本地或 ec2),然后运行npm ci
npm run build
=> 然后控制台会告诉你问题。
添加回答
举报
0/150
提交
取消