-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodejs.sh
30 lines (24 loc) · 999 Bytes
/
nodejs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### Some packages might not be correctly installed if the node version is too low. ###
# Optional! (Start)
# Make sure to remove all the mistakenly installed Node&NPM-related packages
sudo apt autoremove --purge nodejs
sudo apt autoremove --purge npm
sudo apt autoremove
sudo apt autoclean
sudo rm -rf /usr/local/lib/node_modules/npm
# Optional! (End)
# download and install Node.js with its affiliated NPM toolkit
cd ~/Downloads
wget https://nodejs.org/dist/v18.14.2/node-v18.14.2-linux-x64.tar.xz
sudo tar -C /usr/local --strip-components 1 -xJf node-v18.14.2-linux-x64.tar.xz
rm node-v18.14.2-linux-x64.tar.xz
# Check the version of Node.js and NPM
node --version # v18.14.2
npm --version # 9.5.0
# NPM Global Packages all supported based version mentioned above
sudo npm install -g servez
sudo npm install -g cryptee
sudo npm install -g splitee
sudo npm install -g wikit #search wikipidea by wikit TARGET
## Reference
# https://itslinuxfoss.com/update-nodejs-version-ubuntu-command-line/