Do I have to npm install in every step in a bitbucket pipeline that I need to use an npm command Do I have to npm install in every step in a bitbucket pipeline that I need to use an npm command docker docker

Do I have to npm install in every step in a bitbucket pipeline that I need to use an npm command


Can you implement it like the documentation: https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html

The functionality is there. Let me know if it doesn't work for you still.


Each step in the pipe creates a separate docker container which pulls in your branch. Using the cache option will allow your pipe to skip the install when building the container for the second step by pulling node_modules from the cache. You must still include the npm install line in each step to tell the pipe to use the cache if it exists.