I’m completely new to circle CI, I managed to sign up for an account and linked my GitHub, I selected a repo, added the code that was provided, pushed the .circleci folder with config.yaml in it and I get an error
error computing cache key: template: cacheKey:1:30: executing "cacheKey" at <checksum "~/project/package-lock.json">: error calling checksum: open /home/circleci/project/package-lock.json: no such file or directory
My config file is the one circle suggested
version: 2.1
orbs:
node: circleci/node@3.0.0
workflows:
node-tests:
jobs:
- node/test
So I look in the docs and find this code snippet that looks like it may do the job
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --immutable
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
but I don’t understand where in the config.yaml it should go? or can I just use pkg-manager: yarn
but again where in the config.yaml does it go?
Why didn’t circle ci detect i had a yarn.lock in the repo and give me the correct yaml to upload? It would have guaranteed success instead of failure when trying circle for the first time.