Skip to content

Commit 7ab4bc7

Browse files
author
Taniya Mathur
committed
Update Node.js version requirements from 18+ to 20.19+ for Vite compatibility
- Update package.json engines to require Node.js 20.19+ and npm 10+ - Update UI README.md to specify NodeJS 20.19+ requirement - Update documentation (deployment.md, setup guides) to use Node.js 20 - Update CI/CD configurations (.gitlab-ci.yml, CodeBuild templates) - Update setup scripts to install Node.js 20 - Update publish.sh validation to require Node.js 20+ - Regenerate package-lock.json with new requirements
1 parent 75815c3 commit 7ab4bc7

File tree

11 files changed

+20
-323
lines changed

11 files changed

+20
-323
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ developer_tests:
4343
- uv venv .venv
4444
- source .venv/bin/activate
4545
# Install Node.js and npm for basedpyright
46-
- curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
46+
- curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
4747
- apt-get install -y nodejs
4848
- npm install -g basedpyright
4949
- uv pip install ruff

docs/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ You need to have the following packages installed on your computer:
114114
4. python 3.11 or later
115115
5. A local Docker daemon
116116
6. Python packages for publish.py: `pip install boto3 rich typer PyYAML botocore setuptools ruff`
117-
7. **Node.js 18+** and **npm** (required for UI validation in publish script)
117+
7. **Node.js 20.19+** and **npm** (required for UI validation in publish script)
118118

119119
For guidance on setting up a development environment, see:
120120

docs/setup-development-env-WSL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cd accelerated-intelligent-document-processing-on-aws
4444
```
4545
This script automatically installs:
4646
- Git, Python 3, pip, and build tools
47-
- Node.js 18
47+
- Node.js 20
4848
- AWS CLI v2
4949
- AWS SAM CLI
5050
- Python dependencies
@@ -77,7 +77,7 @@ Enter your AWS credentials when prompted. Refer to: https://docs.aws.amazon.com/
7777
python3 --version (Example: Python 3.12.3)
7878
aws --version (Example: aws-cli/2.28.26)
7979
sam --version (Example: SAM CLI, version 1.143.0)
80-
node --version (Example: v18.20.8)
80+
node --version (Example: v20.19.0)
8181
npm --version (Example: 10.8.2)
8282
```
8383
### 4.2 Test Build Process

docs/setup-development-env-macos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ sam --version
142142
```
143143

144144

145-
## 7) Node.js via nvm (Node 18 LTS)
145+
## 7) Node.js via nvm (Node 20 LTS)
146146

147147
Use nvm to manage Node versions. This mirrors your Linux section but uses zsh-friendly profile updates.
148148

@@ -156,9 +156,9 @@ fi
156156
export NVM_DIR="$HOME/.nvm"
157157
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
158158

159-
# Install Node 18 LTS
160-
nvm install 18
161-
nvm alias default 18
159+
# Install Node 20 LTS
160+
nvm install 20
161+
nvm alias default 20
162162

163163
# Test
164164
node -v

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"typecheck:stats": "basedpyright --stats"
1818
},
1919
"engines": {
20-
"node": ">=18.0.0",
20+
"node": ">=20.19.0",
2121
"npm": ">=9.0.0"
2222
}
2323
}

publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ check_nodejs_dependencies() {
108108
node_version=$(node --version 2>/dev/null | sed 's/v//')
109109
node_major=$(echo "$node_version" | cut -d'.' -f1)
110110

111-
if [[ "$node_major" -lt 18 ]]; then
112-
print_error "Node.js $node_version found, but 18+ is required for UI validation"
111+
if [[ "$node_major" -lt 20 ]]; then
112+
print_error "Node.js $node_version found, but 20+ is required for UI validation"
113113
print_info "Please upgrade Node.js to version 18 or later"
114114
exit 1
115115
else

scripts/dev_setup_al2023.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-lin
4848
unzip aws-sam-cli-linux-x86_64.zip -d ./sam-cli
4949
sudo ./sam-cli/install --update
5050

51-
# node 18
51+
# node 20
5252
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # nosemgrep: bash.curl.security.curl-pipe-bash.curl-pipe-bash - Official NVM installation script for development environment only
5353
source ~/.bashrc
5454
nvm install 18

scripts/wsl_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sudo apt install build-essential make -y
2929
python3 --version
3030

3131
# Install Node.js 18
32-
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - # nosemgrep: bash.curl.security.curl-pipe-bash.curl-pipe-bash - Official NodeSource repository with HTTPS verification for development environment only
32+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - # nosemgrep: bash.curl.security.curl-pipe-bash.curl-pipe-bash - Official NodeSource repository with HTTPS verification for development environment only
3333
sudo apt-get install -y nodejs
3434

3535
# Install AWS CLI

src/ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Example contents of `.env` file:
1717
VITE_SETTINGS_PARAMETER=CFN-IDPSettingsParameter-XXXXXXXXXXXX
1818
```
1919

20-
2. Make sure you have NodeJS 16+ installed.
20+
2. Make sure you have NodeJS 20.19+ installed.
2121
3. Run `npm install` to install dependencies
2222
4. Run `npm run start` to start the local development mode.
2323
5. Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

0 commit comments

Comments
 (0)