基本上,您需要创建一个npx create-react-app
的Reaction应用程序,创建一个Github回购,使用AWS Amplify控制台连接并授权Github,然后部署该应用程序.
在"Deploy Your app to AWS Amplify"一节中,我一直收到构建失败的错误,日志(log)如下:
## Checking for associated backend environment...
## No backend environment association found, continuing...
npm ERR! Missing: typescript@4.9.5 from lock file
npm ERR! Missing: ajv@6.12.6 from lock file
npm
2023-03-04T05:29:24.352Z [WARNING]: ERR! Missing: ajv-keywords@3.5.2 from lock file
npm ERR! Missing: json-schema-traverse@0.4.1 from lock file
npm ERR! Missing: ajv@6.12.6 from lock file
npm ERR! Missing: ajv-keywords@3.5.2 from lock file
npm ERR! Missing: json-schema-traverse@0.4.1 from lock file
npm ERR! Missing: json-schema-traverse@0.4.1 from lock file
npm ERR! Missing: ajv@6.12.6 from lock file
npm ERR! Missing: ajv-keywords@3.5.2 from lock file
npm ERR! Missing: json-schema-traverse@0.4.1 from lock file
npm ERR! Missing: json-schema-traverse@0.4.1 from lock file
npm ERR!
npm ERR! Clean install a project
npm
2023-03-04T05:29:24.352Z [WARNING]: ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm
2023-03-04T05:29:24.353Z [WARNING]: ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
2023-03-04T05:29:24.354Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-04T05_29_21_673Z-debug-0.log
2023-03-04T05:29:24.359Z [ERROR]: !!! Build failed
2023-03-04T05:29:24.359Z [ERROR]: !!! Non-Zero Exit Code detected
2023-03-04T05:29:24.359Z [INFO]: # Starting environment caching...
2023-03-04T05:29:24.360Z [INFO]: # Environment caching completed
Terminating logging...
这是我试图部署的Github回购:https://github.com/AsafO7/-amplify-react-graphql
在谷歌搜索之后,我被告知try 在本地删除my package-lock.json
和npm install
,但构建仍然失败.
我也try 了npm audit fix --force
,但构建仍然失败(请注意,我不断地将package.json
和package-lock.json
文件更新到repo).
我一直在按照教程的说明go 做,甚至删除了所有的东西,再次try ,但都没有效果.