Hello,
I am trying to use the node cache option for the first time, but I don't think I properly understand the setup.
Here is what my yml looks like so far for testing:
image: node:dubnium
pipelines:
branches:
dev:
- step:
name: init
caches:
- node
script:
- npm install
- step:
name: build
script:
- npm run build
artifacts:
- public/**
(ignore any tab/line break issues, the file parses fine, just me trying to format it in this post)
It was my understanding that this setup would do the following:
1) Check for node_modules, and if it doesn't exist, run step 1 to install them and then cache them. If it does exist, skip this step and just download the cache
2) Run the build step.
I can see the cache being created on the bitbucket UI, but every time I run this pipeline it runs the npm install (regardless of cache existing or not) and then fails on the build step as it can't find the node_modules. Do I need to format this differently? I know in the past, before trying to use cache, I would place the node_modules in the artifacts during the first step.