NPM Shrinkwrap and TeamCity Build Fails

What did you do!?!

Why?

  1. My NPM shrinkwrap change was sitting in a branch waiting for QA to run all their tests against the branch.
  2. TeamCity had picked up this branch, checked it out, and gone through it’s steps.
  3. We don’t clear out the directory on each checkout as it massively increases our build times.
  4. Not clearing the directory left us with a npm-shrinkwrap.json file. All of the other branches didn’t have this file, so while TeamCity was checking out their packages.json file, it was not touching the shrinkwrapped verson.
  5. When npm install was run as part of the build process on these branches, it was using the other branch’s shrinkwrap file.
  6. FAIL.

Never fear…

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ben Gale

Ben Gale

More from Medium

Typescript Rest and Spread Operator

Features of Different Javascript Framework : Node Js, BackBone JS, Ext Js

Easy alternatives for Map and Set in a JavaScript-oriented front-end, back-end configuration

5 Helpful Shorthands in TypeScript