-
-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathnode.sh
More file actions
27 lines (21 loc) · 549 Bytes
/
node.sh
File metadata and controls
27 lines (21 loc) · 549 Bytes
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
export NVM_DIR=/home/runner/nvm
export NODE_VERSION=14
if ! ls $NVM_DIR > /dev/null 2>&1
then mkdir -p $NVM_DIR
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
fi
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use $NODE_VERSION
# You may want to run this if you change node version
rm -rf node_modules/
npm i
# install a custom npm version
if [ $(npm -v) != "6.14.9" ]
then npm i -g npm@6.14.9
fi
#just to check if any package is missing
npm outdated | grep "MISSING"
if [ $? -eq 0 ]
then npm i
fi
node .