File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change 8
8
fi
9
9
10
10
# ###########################################
11
- # Install NodeJS, NVM , PM2, and grunt
11
+ # Install NVM, NodeJS , PM2, and grunt
12
12
# ###########################################
13
13
14
- # First install the latest NodeJS LTS version
15
- curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
16
- apt-get install -y nodejs
14
+ # NVM and prerequisites
15
+ apt-get install -y curl gnupg2
16
+ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
17
+ source ~ /.bashrc
18
+
19
+ # Initial install of NodeJS (20.6.1 is an LTS version)
20
+ nvm install 20.6.1
21
+ npm install -g npm@latest
17
22
18
23
# Install node version manager, globally
19
- curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
20
24
mv ~ /.nvm /opt/nvm
21
25
chmod -R 755 /opt/nvm
22
26
export NVM_DIR=" /opt/nvm"
@@ -25,21 +29,22 @@ export NVM_DIR="/opt/nvm"
25
29
export PATH=" /opt/nvm:$PATH "
26
30
27
31
# Install last three NodeJS LTS versions
28
- nvm install 14.21 .2
29
- nvm install 16.19.0
30
- nvm install 18.13.0
31
- nvm alias default 18.13.0
32
+ nvm install 16.20 .2
33
+ nvm install 18.17.1
34
+ nvm alias default 20.6.1
35
+
32
36
33
37
# Install grunt, pm2 globally for all versions
38
+ nvm use v16
34
39
npm install -g grunt-cli
35
40
npm install -g pm2
36
- nvm use v16
41
+ nvm use v18
37
42
npm install -g grunt-cli
38
43
npm install -g pm2
39
- nvm use v14
44
+ nvm use v20
40
45
npm install -g grunt-cli
41
46
npm install -g pm2
42
- nvm use v18
47
+
43
48
44
49
# ###########################################
45
50
# Install templates
You can’t perform that action at this time.
0 commit comments