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

"Executing custom build scripts is not yet implemented" when deploying via Amplify console (preview) #13425

Closed
5 tasks done
rwbayer opened this issue Nov 21, 2023 · 4 comments
Closed
5 tasks done
Labels
hosting Issues tied to hosting category pending-triage Issue is pending triage

Comments

@rwbayer
Copy link

rwbayer commented Nov 21, 2023

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.
  • I have removed any sensitive information from my code snippets and submission.

App Id

d1njppq202jn9q

AWS Region

us-west-2

Amplify Hosting feature

Backend builds, Backend environments, Build settings, Deployments

Frontend framework

Next.js

Next.js version

13.5.3

Next.js router

App Router

Describe the bug

The backend deployment of previews are failing with the error:

: 🛑 Executing custom build scripts is not yet implemented

My build script has not changed from previous deployments that succeeded (pasted below).

The feature branch I am trying to deploy did involve a local upgrade to the cli on my machine, but I don't see how that would cause it. I was able to manually deploy the backend environment from my local machine that is failing to deploy in the preview.

Expected behavior

The build for a preview should succeed.

Reproduction steps

  1. use amplify.yml below
  2. open a PR with previews enabled
  3. See error regarding build scripts not being implemented

Build Settings

version: 1
backend:
  phases:
    build:
      commands:
        - "# Execute Amplify CLI with the helper script"
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - nvm use 18
        - yarn install
    build:
      commands:
        - nvm use 18
        - env | grep -e FIRST_API_KEY >> .env.production
        - env | grep -e ANOTHER_ >> .env.production
        - env | grep -e SOME_ >> .env.production
        - yarn run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*


### Log output

<details>

Put your logs below this line

2023-11-21T19:32:55.939Z [WARNING]: ✔ Initialized provider successfully.
2023-11-21T19:32:57.292Z [WARNING]: ✖ There was an error initializing your environment.
2023-11-21T19:32:57.294Z [INFO]: 🛑 Executing custom build scripts is not yet implemented
2023-11-21T19:32:57.294Z [INFO]: Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2023-11-21T19:32:57.297Z [INFO]:
2023-11-21T19:32:57.297Z [INFO]: Session Identifier: 8adb0478-1ba4-4358-830a-569f8e2d6dab
2023-11-21T19:32:57.324Z [WARNING]: - Uploading files.
2023-11-21T19:32:57.456Z [ERROR]: !!! Build failed
2023-11-21T19:32:57.456Z [INFO]: Please read more about Amplify Hosting's support for SSR frameworks to find if your build failure is related to an unsupported feature: https://docs.aws.amazon.com/amplify/latest/userguide/amplify-ssr-framework-support.html. You may also find this troubleshooting guide useful: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html
2023-11-21T19:32:57.457Z [ERROR]: !!! Non-Zero Exit Code detected
2023-11-21T19:32:57.457Z [INFO]: # Starting environment caching...
2023-11-21T19:32:57.457Z [INFO]: # Environment caching completed
Terminating logging...


</details>


### Additional information

Other than updating the CLI on my local machine, I can't think of what would have changed to alter the behavior. The build scripts were previously working.
@rwbayer rwbayer added the pending-triage Issue is pending triage label Nov 21, 2023
@Narrator Narrator transferred this issue from aws-amplify/amplify-hosting Nov 22, 2023
@ykethan
Copy link
Member

ykethan commented Nov 22, 2023

Hey @rwbayer, thank you for reaching out. Do you have any live package set for Amplify CLI in AWS Amplify console?
As the issue appears to be similar to aws-amplify/amplify-hosting#3670
Where you have created a lambda function with the latest version of Amplify CLI then build then try to build the function in a older version of Amplify CLI before v12.2.0.
Could you try setting the Amplify CLI version to latest and rerun the build?

Additionally, could you add AMPLIFY_ENABLE_DEBUG_OUTPUT to true as a environment variable in the AWS Amplify console this should enable verbose logging.

@ykethan ykethan added hosting Issues tied to hosting category pending-response Issue is pending response from the issue author labels Nov 22, 2023
@rwbayer
Copy link
Author

rwbayer commented Nov 22, 2023

@ykethan Thank you for your response. I searched this bug but did not see the linked issue in the hosting repo. It is the same issue for me.

I was not using live packages before, but turning on this feature and setting amplify-cli to "latest" fixed the issue for me.

Appreciate the help!

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 22, 2023
@rwbayer rwbayer closed this as completed Nov 22, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@femmedecentral
Copy link

Where you have created a lambda function with the latest version of Amplify CLI then build then try to build the function in a older version of Amplify CLI before v12.2.0. Could you try setting the Amplify CLI version to latest and rerun the build?

FWIW - I came across this issue when I had a similar bug, and anchoring the Amplify CLI version in my amplify.yml to my local Amplify CLI version fixed the issue for me.

Over the course of development, I had upgraded my Amplify CLI, made a new function, and then did a regular deploy with my Github / CI system which was using a version of the Amplify CLI that was behind my local version. Hope this helps someone else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosting Issues tied to hosting category pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants