Interview Prep/Jenkins/SCM, multibranch & webhooks

`ERROR: Library shack-lib expected to contain at least one of src or vars directories`

BeginnerTroubleshootingSCM, multibranch & webhooks
Answer

Likely causes → The retriever points to the wrong repo, branch or subdirectory; the library files are nested (e.g. under jenkins/) without setting the library path.

Diagnose → Browse the configured version in Git and check top-level folders.

Fix → Fix the repo URL/version, or set Library Path (libraryPath: 'jenkins/' in modernSCM) for libraries in a subfolder.

Prevent → Keep libraries in dedicated repos with vars/ and src/ at the root.

All Jenkins questions Roadmap: Jenkins

More on SCM, multibranch & webhooks