mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Upgrade node to v18 (LTS) (#16589)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -i
|
||||
# Resolve all frontend dependencies that the application requires to develop.
|
||||
|
||||
# Stop on errors
|
||||
@@ -6,5 +6,17 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Install/upgrade node when inside devcontainer
|
||||
if [[ -n "$DEVCONTAINER" ]]; then
|
||||
nodeCurrent=$(nvm version default || echo "")
|
||||
nodeLatest=$(nvm version-remote "$(cat .nvmrc)")
|
||||
if [[ -z "$nodeCurrent" ]]; then
|
||||
nvm install
|
||||
elif [[ "$nodeCurrent" != "$nodeLatest" ]]; then
|
||||
nvm install --reinstall-packages-from="$nodeCurrent" --default
|
||||
nvm uninstall "$nodeCurrent"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install node modules
|
||||
yarn install
|
||||
yarn install
|
||||
|
||||
Reference in New Issue
Block a user