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

AWS Stack deploy fails in Amplify Frontend #89

Open
werkamsus opened this issue Feb 28, 2024 · 6 comments
Open

AWS Stack deploy fails in Amplify Frontend #89

werkamsus opened this issue Feb 28, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@werkamsus
Copy link

Bug report

Describe the bug

The AWS Amplify build of the frontend fails (logs attached)
This also happens on latest, stable, and build 7.0

I recall one-click deploying in december, where everything worked out of the box.

To Reproduce

Deploy any AWS stack, i.e. "stable" to us-west-2.

Expected behavior

Build completes and supabase studio is reachable

Logs

2024-02-28T19:35:56.785Z [INFO]: # Starting phase: preBuild
                                 # Executing command: echo POSTGRES_PASSWORD=$(aws secretsmanager get-secret-value --secret-id $DB_SECRET_ARN --query SecretString | jq -r . | jq -r .password) >> .env.production
2024-02-28T19:35:57.451Z [INFO]: # Executing command: echo SUPABASE_ANON_KEY=$(aws ssm get-parameter --region $SUPABASE_REGION --name $ANON_KEY_NAME --query Parameter.Value) >> .env.production
2024-02-28T19:35:58.123Z [INFO]: # Executing command: echo SUPABASE_SERVICE_KEY=$(aws ssm get-parameter --region $SUPABASE_REGION --name $SERVICE_KEY_NAME --query Parameter.Value) >> .env.production
2024-02-28T19:35:58.804Z [INFO]: # Executing command: env | grep -e STUDIO_PG_META_URL >> .env.production
2024-02-28T19:35:58.806Z [INFO]: # Executing command: env | grep -e SUPABASE_ >> .env.production
2024-02-28T19:35:58.807Z [INFO]: # Executing command: env | grep -e NEXT_PUBLIC_ >> .env.production
2024-02-28T19:35:58.808Z [INFO]: # Executing command: cd ../
2024-02-28T19:35:58.809Z [INFO]: # Executing command: npx [email protected] prune --scope=studio
2024-02-28T19:35:59.598Z [WARNING]: npm
2024-02-28T19:35:59.607Z [WARNING]: WARN exec The following package was not found and will be installed: [email protected]
2024-02-28T19:36:00.603Z [INFO]: Generating pruned monorepo for studio in /codebuild/output/src4190248314/src/Supabase/out
2024-02-28T19:36:00.605Z [INFO]: - Added common
2024-02-28T19:36:00.605Z [INFO]: - Added config
2024-02-28T19:36:00.605Z [INFO]: - Added shared-data
2024-02-28T19:36:00.674Z [INFO]: - Added studio
2024-02-28T19:36:00.675Z [INFO]: - Added tsconfig
2024-02-28T19:36:00.709Z [INFO]: - Added ui
2024-02-28T19:36:00.790Z [INFO]: # Executing command: npm clean-install
2024-02-28T19:36:04.804Z [WARNING]: npm
2024-02-28T19:36:04.809Z [WARNING]: ERR! code EBADENGINE
                                    npm ERR! engine Unsupported engine
                                    npm ERR! engine Not compatible with your version of node/npm: [email protected]
                                    npm ERR! notsup Not compatible with your version of node/npm: [email protected]
                                    npm ERR! notsup Required: {"npm":">=9.0.0 <10.0.0","node":">=18.0.0 <19.0.0"}
                                    npm ERR! notsup Actual:   {"npm":"10.2.3","node":"v18.19.0"}
                                    npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-28T19_36_01_021Z-debug-0.log
2024-02-28T19:36:04.928Z [ERROR]: !!! Build failed
2024-02-28T19:36:04.929Z [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
2024-02-28T19:36:04.929Z [ERROR]: !!! Error: Command failed with exit code 1
2024-02-28T19:36:04.929Z [INFO]: # Starting environment caching...
2024-02-28T19:36:04.929Z [INFO]: # Environment caching completed
Terminating logging...
@werkamsus werkamsus added the bug Something isn't working label Feb 28, 2024
@bhaktatejas922
Copy link

bhaktatejas922 commented Mar 5, 2024

same issue here

@cepko33
Copy link

cepko33 commented Mar 7, 2024

It looks like the public.ecr.aws/sam/build-nodejs18.x:latest image has an incompatible npm version, but you can specify the Amplify build image to something like public.ecr.aws/sam/build-nodejs18.x:1.100 which is working for me.

@bsuredigital
Copy link

bsuredigital commented Apr 8, 2024

me to have this issue but with build 100 it is working also

@ManuelAngel99
Copy link

Same issue here

@arvehisa
Copy link

same here

@dubscode
Copy link

In the build spec for the studio stack, you can explicitly install a compatible npm version. On line 17 of my screenshot, I added to the preBuild section: 'npm install -g [email protected]'

Hope this can help folks.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants