En utilisant AWS re:Post, vous acceptez les AWS re:Post Conditions d’utilisation

Amplify NextJs Frontend Build Failing

0

Trying to build a NextJs App using Node v10.19.0 and NextJs 10.0.7. The application compiled successfully but right after the message "Staring SSR Build...". In my build settings, I have specified pre-build commands to use nvm install 10.19.0 as well as update the build image settings to use Next.js version 10. Does anyone know why this is happening? Why would it require node >= 12?

{ Error: Command failed: npm install @sls-next/-component@3.7.0 --prefix /root/./ npm WARN EBADENGINE Unsupported engine { package: '@aws-sdk/client-s3@3.54.0', npm WARN EBADENGINE required: { node: '>=12.0.0' }, npm WARN EBADENGINE current: { node: 'v10.19.0', npm: '7.24.2' } } npm WARN EBADENGINE Unsupported engine { package: '@aws-sdk/client-sqs@3.54.0', npm WARN EBADENGINE required: { node: '>=12.0.0' }, npm WARN EBADENGINE current: { node: 'v10.19.0', npm: '7.24.2' } }...

demandé il y a 2 ans2,1 k vues
1 réponse
0
Réponse acceptée

Hello,

I have researched on this issue and successfully able to reproduce and solve the issue in my test envrionment, kindly allow me share my findings with you,

a) Does anyone know why this is happening? 2. Why would it require node >= 12?

Since, the Node js version 10.19.0 is released on (2020-02-05), and @aws-sdk/client-<package>-3.54.0 are released 6 month back, due to this reason latest aws-sdk packages might not compaitible with 2 year old version of Node js 10.19.0.

b) How to resolve this issue ?

To resolve this issue please follow below navigation to modify your build setting and set the Nodejs and Nextjs version for you Amplify application deployment.

  • Amplify --> Select your Amplify App --> Go to the Build settings --> Go to Build image settings

Node.js version: 12

Next.js version: 10.0.7

Thanks

AWS
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a 8 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions