Skip to content

Commit cf39d8c

Browse files
authored
fix: Node.js v20 or later required (#68)
* chore: add engines field to specify supported Node.js versions * docs: update README to specify Node.js v20 requirement and add installation instructions * chore: add changeset
1 parent 8e23b71 commit cf39d8c

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

.changeset/thin-bars-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"vite-plugin-react-router-amplify-hosting": patch
3+
---
4+
5+
fix: Node.js v20 or later required

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
},
1515
"homepage": "https://github.com/fossamagna/react-router-amplify/blob/main/README.md",
1616
"packageManager": "pnpm@10.9.0",
17+
"engines": {
18+
"node": "^20.0.0 || >=22.0.0"
19+
},
1720
"scripts": {
1821
"build": "pnpm --if-present --recursive build",
1922
"release": "pnpm test && pnpm build && changeset publish",
@@ -41,4 +44,4 @@
4144
"lint-staged": {
4245
"*.ts": "pnpm lint"
4346
}
44-
}
47+
}

packages/vite-plugin-react-router-amplify-hosting/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ frontend:
4343
phases:
4444
preBuild:
4545
commands:
46+
# vite-plugin-react-router-amplify-hosting requre Node.js v20 or later
47+
- nvm install 20
48+
- nvm use 20
4649
- "npm ci --cache .npm --prefer-offline"
4750
build:
4851
commands:
@@ -56,6 +59,11 @@ frontend:
5659
- ".npm/**/*"
5760
```
5861
62+
This plugin require Node.js v20 or later.
63+
You need to install Node.js v20 or later using nvm in `amplify.yml` or specify 20 for the Node.js version in the Amplify Hosting build image settings as shown below.
64+
65+
![the Node.js version in the Amplify Hosting build image settings](./docs/build-settings-node-version.png)
66+
5967
## License
6068

6169
This package was created under the [MIT License](LICENSE).
262 KB
Loading

packages/vite-plugin-react-router-amplify-hosting/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"url": "https://github.com/fossamagna/react-router-amplify/issues"
3131
},
3232
"homepage": "https://github.com/fossamagna/react-router-amplify/blob/main/packages/vite-plugin-react-router-amplify-hosting/README.md",
33+
"engines": {
34+
"node": "^20.0.0 || >=22.0.0"
35+
},
3336
"scripts": {
3437
"dev": "vite",
3538
"build": "tsc && vite build"
@@ -43,4 +46,4 @@
4346
"peerDependencies": {
4447
"vite": "^5.1.0 || ^6.0.0"
4548
}
46-
}
49+
}

0 commit comments

Comments
 (0)