Closed
Description
Description:
cache-dependency-path
to a subfolder results in Error: Some specified paths were not resolved, unable to cache dependencies.
Action version:
actions/setup-node@v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
The node 16.x version with corresponding npm version you get in Github.
node-version: 16
check-latest: true
Repro steps:
Repo structure:
<git root>
├── docs
│ └── README.md
├── firebase.json
└── functions
├── jest.config.ts
├── lib
├── node_modules
├── package.json
├── package-lock.json
├── src
├── tsconfig.json
└── tsconfig.prod.json
Relevant workflow part:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
check-latest: true
cache: "npm"
cache-dependency-path: "${ GITHUB_WORKSPACE }/functions/package-lock.json"
But for cache-dependency-path I've also tried these strings:
- "functions/package-lock.json"
- "./functions/package-lock.json"
- "*/package-lock.json"
And they all fail:
Environment details
/opt/hostedtoolcache/node/16.18.0/x64/bin/npm config get cache
/home/runner/.npm
Error: Some specified paths were not resolved, unable to cache dependencies.
Expected behavior:
Caching to work even though the package lock file is in a subfolder called functions.
Actual behavior:
See repro steps above.