[REM] ubuntu 18.04 is broken, need to install manually nodejs and npm

This commit is contained in:
Mathieu Benoit 2022-12-21 04:54:43 -05:00
parent 5f4c9501c4
commit 3071fb2663
2 changed files with 59 additions and 24 deletions

View file

@ -16,6 +16,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Update to Python==3.7.16 - Update to Python==3.7.16
- Update poetry==1.3.1 - Update poetry==1.3.1
### Removed
- Ubuntu 18.04 is broken, need to install manually nodejs and npm
## [1.4.0] - 2022-10-05 ## [1.4.0] - 2022-10-05
**Migration note** **Migration note**

View file

@ -89,6 +89,36 @@ if [[ $retVal -ne 0 ]]; then
fi fi
echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----" echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
if [ "18.04" == "${UBUNTU_VERSION}" ]; then
sudo apt remove nodeJS npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
chmod +x ~/.nvm/nvm.sh
. $NVM_DIR/nvm.sh && nvm install 16.15.1
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "nvm installation error."
exit 1
fi
source ~/.bashrc
npm install npm@latest -g
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install npm lastest installation error."
exit 1
fi
npm install -g rtlcss
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install rtlcss installation error."
exit 1
fi
npm install -g less
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install less installation error."
exit 1
fi
else
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs sudo apt-get install -y nodejs
retVal=$? retVal=$?
@ -114,6 +144,7 @@ if [[ $retVal -ne 0 ]]; then
echo "npm install less installation error." echo "npm install less installation error."
exit 1 exit 1
fi fi
fi
echo -e "\n---- Test tool ----" echo -e "\n---- Test tool ----"
sudo npm install -g prettier sudo npm install -g prettier