lin*_*ina 3 containers amazon-web-services docker reactjs aws-amplify
我的反应应用程序没有通过构建部分。我能够解决之前的一些错误,但我陷入了这一错误: 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/**/*
Run Code Online (Sandbox Code Playgroud)
小智 5
发生这种情况的原因是没有 的条目artifacts,其中包含baseDirectory和files,https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.artifacts。
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- node -v
- npm run-script build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7351 次 |
| 最近记录: |