From 28aba1c5572653fec7d3d7f52a9e4ccc53264165 Mon Sep 17 00:00:00 2001 From: Stivenjs Date: Thu, 5 Jun 2025 10:36:09 -0500 Subject: [PATCH] chore(amplify): update Node version in amplify.yml and enhance npm installation process This commit updates the Node version in amplify.yml from 22 to 20 for both backend and frontend preBuild phases. It also modifies the npm installation commands to include a global installation of ampx and adds a command to check the Node version, improving the build process and ensuring compatibility with the specified Node version. --- amplify.yml | 11 ++++++----- package.json | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/amplify.yml b/amplify.yml index 22832d25..5978bc83 100644 --- a/amplify.yml +++ b/amplify.yml @@ -3,18 +3,20 @@ backend: phases: preBuild: commands: - - nvm install 22 - - nvm use 22 + - nvm install 20 + - nvm use 20 build: commands: - npm ci --cache .npm --prefer-offline - - npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID + - npm install -g ampx + - node -v + - npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID frontend: phases: preBuild: commands: - - nvm use 22 + - nvm use 20 - npm ci build: @@ -29,4 +31,3 @@ frontend: - .next/cache/**/* - .npm/**/* - node_modules/**/* - diff --git a/package.json b/package.json index 115f023c..0d4ed5fc 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "next build", "start": "next start", "lint": "next lint", + "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage"