我的react应用程序没有通过构建部分。我能够纠正前面的一些错误,但我被这个错误卡住了:2021-10-03T20:15:39.408Z [ERROR]: !!! CustomerError: Base Directory not specified for artifacts, unable to create build artifact..
这是我的构建设置,即amplify.yml文件。有人知道我如何修复这个错误吗?
version: 1
backend:
phases:
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- node -v
- npm run-script build
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*发布于 2021-10-19 03:27:39
发生这种情况的原因是没有包含baseDirectory和files、https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.artifacts的artifacts的条目。
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- node -v
- npm run-script build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*https://stackoverflow.com/questions/69429033
复制相似问题