添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ .
  • I have searched for duplicate or closed issues .
  • I have read the guide for submitting bug reports .
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • App Id

    d1wuh42i6cy93b

    Region

    us-east-1

    Amplify Console feature

    Backend builds

    Describe the bug

    When pushing and amplify consosle triggers automated build, the backend is failing with error:

    Starting phase: build

    2021-12-16T03:12:24.377Z [WARNING]: /codebuild/output/src162106254/src/latertax-web/amplify.sh: line 4: amplify: command not found
    2021-12-16T03:12:24.377Z [ERROR]: !!! Build failed
    2021-12-16T03:12:24.377Z [ERROR]: !!! Non-Zero Exit Code detected
    2021-12-16T03:12:24.378Z [INFO]: # Starting environment caching...
    2021-12-16T03:12:24.378Z [INFO]: # Uploading environment cache artifact...
    2021-12-16T03:12:24.470Z [INFO]: # Environment caching completed
    Terminating logging...

    Expected behavior

    Build should not fail

    Reproduction steps

  • push to branch that triggers build that was previously deploying
  • Build Settings

    No response

    Additional information

    No response

    Hi 👋, thanks for opening! While we look into this...

    If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions.

    Lastly, please make sure you've specified the App ID and Region in the issue!

    Hmmm I disabled the backend build by commenting out amplifyPush --simple

    There was then an error because I did not have environment variable when accessing github private package. I added that to amplify console and am using this build script:

    version: 0.1
    backend:
      phases:
        build:
          commands:
            - '# Execute Amplify CLI with the helper script'
            - amplifyPush --simple
    frontend:
      phases:
        preBuild:
          commands:
            - nvm use $VERSION_NODE_12
            - npm install -g npm@latest
            - npm install
        build:
          commands:
            - nvm use $VERSION_NODE_12
            - node -v
            - npm run build
      artifacts:
        baseDirectory: build
        files:
          - '**/*'
      cache:
        paths:
          - node_modules/**/*
    

    Seems to be working now 🤷‍♂️