Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Attempting to run pull with custom build scripts failing #3816

Open
4 tasks done
jay-herrera opened this issue Nov 20, 2023 · 0 comments
Open
4 tasks done

Attempting to run pull with custom build scripts failing #3816

jay-herrera opened this issue Nov 20, 2023 · 0 comments
Labels
question Further information is requested

Comments

@jay-herrera
Copy link

jay-herrera commented Nov 20, 2023

Before opening, please confirm:

App Id

ddkfcre2qrht6

AWS Region

us-east-1

Amplify Hosting feature

Build settings

Question

I am having trouble building on Amplify hosting using custom build scripts in amplify.yml. The script always gets hung up on whatever command I use before amplify pull. I need pull to bring in the aws-exports.js file and a post-pull script to run in order to modify that file. I have not even been able to get pull to run in the build process. Here is an example of the yml in one attempt:

version: 5
backend:
  phases:
    preBuild:
      commands:
        - npm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
        - echo "@pqina:registry=https://npm.pqina.nl/" >> .npmrc
        - echo "//npm.pqina.nl/:_authToken=${PQINA_NPM_TOKEN}" >> .npmrc
        - npm i
    build:
      commands:
        - echo "running build backend..."
        - amplify pull --appId ddkfcre2qrht6 --envName test --yes
        - echo "hello"
frontend:
  phases:
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
@jay-herrera jay-herrera added the question Further information is requested label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant