[Linux] Rework NodeJS install (#4378)

This commit is contained in:
Nikolay Frolov
2021-10-30 14:56:36 +03:00
committed by GitHub
parent 234919982e
commit 5f33b32a1e
4 changed files with 15 additions and 2 deletions

View File

@@ -7,9 +7,12 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
# Install LTS Node.js and related build tools
# Install default Node.js
defaultVersion=$(get_toolset_value '.node.default')
# TODO: Usage of "githubusercontent.com/mklement0" doesn't look like a correct approach. Need to correct it according to the official Node.js docs.
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
~/n/bin/n lts
~/n/bin/n $defaultVersion
# Install node modules
node_modules=$(get_toolset_value '.node_modules[].name')