move npm upgrade to root

This commit is contained in:
Hyatt 2023-06-01 08:59:06 -05:00
parent 4865a0de89
commit 0120890ac4
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -161,12 +161,12 @@ pipeline {
mkdir -p /root/.npm/_logs
chmod 755 /root
chown -R 1000:1000 /root/.npm
printf '%s\\n' "Upgrading NPM"
npm install -g npm@^9.6.7
printf '%s\\n' "Changing user to node"
su - node
printf '%s\\n' "Setting up NODE user build permissions"
mkdir -p "/home/node/.npm"
printf '%s\\n' "Setting up PATH"
export PATH="/home/node/.npm/bin:${PATH}"
printf '%s\\n' "Configuring NODE"
npm config set prefix="/home/node/.npm"
npm config set unsafe-perm true