Frontend fails but still update

0

Hello,

The frontend build fails even though there are no errors, only warnings for the npm install. I confirmed that build is working via CLI (using create react app). Also, confirmed my front end changes are deployed.

It seems like Amplify Console is reporting a failed build when in reality it worked.

kay33
質問済み 5年前257ビュー
4回答
0

Also, builds sometimes take up to 30 mins.

kay33
回答済み 5年前
0

Now my app is not updating at all.

kay33
回答済み 5年前
0

cache size issue. see here for workaround:

https://github.com/aws-amplify/amplify-cli/issues/1415

kay33
回答済み 5年前
0

You could solve it by removing any override package version in Amplify build settings.

You might add npm i -g @aws-amplify/cli as a preBuild command, which forces a reset in the cache.

version: 1
backend:
  phases:
    preBuild:
      commands:
        - npm i -g @aws-amplify/cli
    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
AWS
回答済み 9ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ