One of the projects I'm working on has a CI/CD pipeline that builds Docker images. The Dockerfile runs yarn install
, then yarn build
. The latter runs the TypeScript compiler tsc
. Everything was working fine, but one day the build failed with the following error:
tsc: command not found
But TypeScript is still part of package.json. Nobody touched package.json or yarn.lock recently. Nobody could reproduce the problem locally with Docker: it only happened in the CI/CD pipeline. What is going on? We needed to debug the Docker build on the CI/CD server.