cache-dependency-path with npm to a subfolder does not work
See original GitHub issueDescription:
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.
Issue Analytics
- State:
- Created 10 months ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
How to specifiy path for actions/setup-node in Github
You can try specifying '**/package-lock.json' in the cache-dependency-path (it didn't work for me with other patterns).
Read more >Run your Github Actions jobs from a specific directory
I am working on a current project where the Backend and the Frontend of the application are on the same repository of Github....
Read more >Subfolders as Dependencies | Better world by better software
Imagine an NPM project when one file requires another file, maybe in a different directory. We have to use a relative path.
Read more >Move to subfolder not working for one or more users ( ONLY)
Answer. PROBLEM. Routing to one or more users' sub-folders as an action in GFI MailEssentials works for most, but not all mailboxes.
Read more >nodejs-fs-utils
There are 36 other projects in the npm registry using nodejs-fs-utils. ... function (err, size) { // callback code }); // don't stop ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @kentlarsson, thanks for you input. We start to investigate the issue.
@kentlarsson @edimossilva i am going to close this issue because of not activity for more than a week, but please feel free to reopen it or create new one in case if the issue exists.