I made a pipeline where the script would clone a git repo and build the application in server where jenkins was hosted . I verified the node and npm versions with respect to server and jenkins environment both are same but the command output that run as ubuntu user and jenkins user is bit different and why this happens since both npm versions are the same . Is running npm commands under different user have any influence ?
this is my command output ran on pipeline process
`+ npm i --legacy-peer-deps
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error <https://github.com/npm/cli/issues>
npm error A complete log of this run can be found in: /var/lib/jenkins/.npm/_logs/2024-07-20T13_19_31_625Z-debug-0.log`
but during my diagnose process , I also checked this same command on the server where jenkins is hosted
`ubuntu@jenkins:/var/lib/jenkins/workspace/exampleproject/frontend_app/frontend$ sudo npm i --legacy-peer-deps
up to date, audited 863 packages in 1s
251 packages are looking for funding
run npm fund for details
found 0 vulnerabilities`
here is the log output for additional clarification
6510 verbose cwd /var/lib/jenkins/workspace/provider-skillsetu-co/onest_provider_frontend/frontend
6511 verbose os Linux 5.15.0-1068-azure
6512 verbose node v22.5.0
6513 verbose npm v10.8.2
6514 error Exit handler never called!
6515 error This is an error with npm itself. Please report this error at:
6516 error <https://github.com/npm/cli/issues>
6517 verbose exit 0
6518 info ok
6519 error A complete log of this run can be found in: /var/lib/jenkins/.npm/_logs/2024-07-20T13_19_31_625Z-debug-0.log
why the same command delivers different response when ran as different user