CircleCI-Public / node-orb

An orb for working with Node.js on CircleCI
https://circleci.com/orbs/registry/orb/circleci/node
MIT License
54 stars 82 forks source link

node/install-packages with Yarn does not use cache #95

Closed AlfonsoUceda closed 2 years ago

AlfonsoUceda commented 3 years ago

Orb version:

circleci/node@4.7.0

What happened:

This is my configuration for this orb:

- node/install-packages:
          pkg-manager: yarn

but always the "Installing YARN packages" step install the packages instead of using the cache.

This is the outpout of the "Restoring cache" step:

Found a cache from build 28614 at node-deps-arch1-linux-amd64-6_85-v1-update-circle-ci-orbs-5iWF2YzHP8e1G6HhzxszgwKVJ5IrCah37qVy9y7D96U=-pCvIcgffSUKf4AQQJL2DcbU1PjkyP85xag3cObI_gM8=
Size: 32 B
Cached paths:
  * /home/circleci/yarn.lock

Downloading cache archive...
Validating cache...

Unarchiving cache...

I've also tried to use cache-path: ~/project/node_modules but it didn't work, in fact it wasn't used at all.

Should not the cached path be the following? * /home/circleci/project/yarn.lock

Using the version 2 of this orb (the current one in my project) the cached path used is this one: * /home/circleci/project/node_modules

Expected behavior:

It should skip installing packages if there is a cache.

Jaryt commented 2 years ago

looks like a duplicate of #61