Description:
We've noticed that the default cache: '' option throws an error since v3.7.0
Post job cleanup.
Error: Cache folder paths are not retrieved for npm with cache-dependency-path =
It's documented in README.md Usage
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
# Package manager should be pre-installed
# Default: ''
cache: ''
Hope this report helps fix the issue for others. Thanks 😊
Action version:
v3.7.0
Platform:
Runner type:
Tools version:
Node.js v18.16.1 with default npm 9.5.1
Repro steps:
Add a GitHub Action workflow step with the default cache: '' option
Here we toggle inputs.use-cache to skip cache restoration of /home/runner/.npm when node_modules is already cached. This speeds up our GitHub Actions workflow runs on Windows
runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
id: setup-node
with:
cache: ${{ inputs.use-cache != 'false' && 'npm' || '' }}
node-version-file: .nvmrc
See the full action.yml for more information
Here's our related PR to pin to version v3.6.0 as a fix:
Expected behavior:
The default cache: '' option to continue working
Actual behavior:
An error is thrown:
Post job cleanup.
Error: Cache folder paths are not retrieved for npm with cache-dependency-path =
See examples of the error output:
Description:
We've noticed that the default
cache: ''option throws an error since v3.7.0It's documented in
README.mdUsageHope this report helps fix the issue for others. Thanks 😊
Action version:
v3.7.0
Platform:
Runner type:
Tools version:
Node.js v18.16.1 with default npm 9.5.1
Repro steps:
Add a GitHub Action workflow step with the default
cache: ''optionHere we toggle
inputs.use-cacheto skip cache restoration of/home/runner/.npmwhen node_modules is already cached. This speeds up our GitHub Actions workflow runs on WindowsSee the full
action.ymlfor more informationHere's our related PR to pin to version v3.6.0 as a fix:
actions/setup-nodeto v3.6.0 alphagov/govuk-frontend#3909Expected behavior:
The default
cache: ''option to continue workingActual behavior:
An error is thrown:
See examples of the error output: