## 事象
この例では[[semantic-release]]を実行したときに[[Node.js]]バージョンが古いとの警告が出た。
```
npm warn EBADENGINE package: '
[email protected]',
npm warn EBADENGINE required: { node: '>=20.8.1' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@semantic-release/
[email protected]',
npm warn EBADENGINE required: { node: '>=20.8.1' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@semantic-release/
[email protected]',
npm warn EBADENGINE required: { node: '>=20.8.1' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@semantic-release/
[email protected]',
npm warn EBADENGINE required: { node: '>=20.8.1' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@semantic-release/
[email protected]',
npm warn EBADENGINE required: { node: '>=20.8.1' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
```
[[setup-node (GitHub Actions)|setup-node]]を指定しても変わらず。
```yaml
steps:
- uses: actions/setup-node@v4
```
## 原因
[[setup-node (GitHub Actions)|setup-node]]でバージョン指定をしていないから。デフォルトではv18が使われるらしい。
## 解決方法
[[setup-node (GitHub Actions)|setup-node]]でバージョンを指定する。
```yaml
steps:
- uses: actions/setup-node@v4
with:
node-version: 22
```