I’ve a nodejs repo with a file structure containing:
package.json
yarn.lock
the CI scripts contains:
- run: yarn install
in the logs i have:
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn.
and for some reason, i’ve a call to tsc in the step too (post install maybe?)
I couldn’t reproduce this locally, or when ssh-ing inside the runner.
I’m using cimg/base:stable + orb circleci/node@5.0.2 (latest) ; i’ve tried with cimg/node@14.17 as well, same output. I’m clueless how to debug this and how to make it work. there’s voodoo in there.
PS : there’s a store cache key computed by checksum of the generated yarn.lock, but the job depending can’t restore the cache key because “~/project/yarn.lock not found” even though it’s here when i ls -al it ; and yes i do the checkout before restore
Is it possible to confirm if you have a checkout step defined within your config? The checkout step will pull down the contents of your repo into a folder called project.
Once this has been done you can either cd into the project folder which can be found at ~/project or you can set the working_directory to the project folder.
Once there then you use the yarn install command it should be able to find your package.json and yarn.lock
If this does not resolve your issue please feel free to raise a support ticket and the team will be happy to look into this for you.
When moving to a new image we would recommend setting up a new cache as the software that is being used will need to set up a new cache to stop issues from occurring due to the cache.
Due to this, we would recommend changing the cache key being used slightly when using a new image.