linnovate / mean

The MEAN stack uses Mongo, Express, Angular(6) and Node for simple and scalable fullstack js applications
http://mean.io
12.13k stars 3.45k forks source link

sh: node: command not found #1983

Closed rkatta22 closed 3 years ago

rkatta22 commented 4 years ago

Hi Team,

I am new to node, In my team we are using NVM in jenkins and node version is configured to v12.14.1 (npm v6.13.4), Jenkins builds was working fine till yesterday, I am not sure what was the issue and suddenly build are failing with below errors, please help me thanks in advance.

Jenkins error: sh: node: command not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT


node versions: [root@ip-10-X,X,X, bin]# node -v v12.14.1 [root@ip-10-X.X.X.X bin]# npm -v 6.13.4 [root@ip-10-X.X.X.X bin]# nvm list v0.12.11 v6.9.0 v8.11.2 v10.15.2 v10.15.3 v10.16.0 v12.13.1 -> v12.14.1 v12.16.1 system default -> v12.14.1

lrwxrwxrwx 1 root root 42 Mar 14 21:49 node -> /root/.nvm/versions/node/v12.14.1/bin/node lrwxrwxrwx 1 root root 41 Mar 14 21:49 npm -> /root/.nvm/versions/node/v12.14.1/bin/npm