Interview Prep/CI/CD/Jenkins Build and Agent Failures

Build passes locally but `npm ci` fails in Jenkins with `npm ERR! code ERESOLVE`.

IntermediateTroubleshootingJenkins Build and Agent Failures
Answer

Likely causes → Different npm/Node versions; lockfile out of sync; peer dependency conflict.

Diagnose → Print node -v && npm -v in the pipeline; compare with local.

Fix → Pin the Node version, regenerate the lockfile with the same npm version, fix the peer conflict (avoid blanket --legacy-peer-deps).

Prevent → .nvmrc/engines and a shared CI image.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Jenkins Build and Agent Failures