-
-
Notifications
You must be signed in to change notification settings - Fork 746
AWS Amplify deployment: node version mismatch in build vs runtime #3718
Copy link
Copy link
Closed
Description
I followed the instructions for deploying Nuxt with Nuxt Content to AWS Amplify. It did not work and I spent some hours debugging. I have found the issue, which I will explain here, and suggest we update the documentation to help future deployers.
The problem is that, to get node:sqlite working, we need node to be version >= 22. In #3589 this is discussed and it turns out we can control the build version on Amplify, meaning the app builds.
However, if we're doing SSR, we also need the runtime version to be at 22. It defaults to 20 in the Amplify runtime even when "live package updates" and amplify.yml are pinned to 22. The latter appears to pertain the the build environment only.
The solution is add to nuxt.config.ts:
nitro: {
awsAmplify: {
runtime: 'nodejs22.x',
},
},So, my suggestion is:
- Update the docs to make this clear
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels