GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v5 fails with Path Validation Error in Post Run steps · Issue #1363 · actions/setup-node

v5 fails with Path Validation Error in Post Run steps #1363

New issue
Copy link
New issue
Copy link
Closed
Closed
v5 fails with Path Validation Error in Post Run steps#1363
Copy link
Assignees
v-gowridurgad
Labels
bugSomething isn't working

Description

@deviantintegral
deviantintegral
opened on Sep 8, 2025
Issue body actions

Description:

Upgrading to v5 causes a a workflow to fail with the following error:

Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.

Action version:

5.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Node 22.19.0 / npx.

Repro steps:

  • Failing PR: chore(deps): update actions/setup-node action to v5 - abandoned Lullabot/drainpipe#935
  • Failing job: https://github.com/Lullabot/drainpipe/actions/runs/17513511413/job/49761979980?pr=935

Expected behavior:

No errors!

Actual behavior:

The error marks the job as failing.

Reacted by Craigory Coppola, Silas Sewell, Oliver Eisenhut, Michael Cousins and Hokuto Shinoda

Activity

  1. deviantintegral
    added
    bugSomething isn't working
    needs triage
    on Sep 8, 2025
  2. silas commented on Sep 8, 2025

    @silas
    silas
    on Sep 8, 2025
    More actions

    Looks like this happens if (npm|pnpm|yarn|...) install isn't run and packageManager is set.

    The work around seems to be to disable caching for jobs that don't run install.

    Reacted by Vandeputte Brice
  3. v-priyagupta108 commented on Sep 9, 2025

    @v-priyagupta108
    v-priyagupta108
    on Sep 9, 2025
    Contributor
    More actions

    Hello @deviantintegral 👋,
    Thank you for your report. We'll investigate the issue and get back to you with the details!

  4. v-priyagupta108
    removed
    needs triage
    on Sep 9, 2025
  5. v-gowridurgad
    self-assigned this
    on Sep 9, 2025
  6. malice00 commented on Sep 9, 2025

    @malice00
    malice00
    on Sep 9, 2025
    More actions

    I am having the same issue after the update to v5, however it happens ONLY on the windows arm64 branch of my matrix!?

    Image Image
  7. v-gowridurgad commented on Sep 11, 2025

    @v-gowridurgad
    v-gowridurgad
    on Sep 11, 2025
    Contributor
    More actions

    Hi @deviantintegral, Thank you for reporting this issue and providing the details.
    Starting with actions/setup-node@v5, caching is enabled by default when a packageManager field is present in the package.json file, even if no cache inputs have been explicitly set in the workflow. For more information, please refer to this setup-node documentation.

    In this scenario, caching is automatically enabled. The action will try to cache dependencies, but if the required paths are missing because the dependencies haven’t been installed yet, you may see the message "no cache is being saved." This is expected behaviour when there is nothing available to cache.

    To resolve this, there are two options:
    1. Disable caching: If caching is not needed, set package-manager-cache: false in the workflow. For example:

    uses: actions/setup-node@v5
    with:
      package-manager-cache: false
    

    2. Enable caching properly: Ensure dependencies are installed before the cleanup or post-run step so that there is something to cache. For example:

    name: Install dependencies
    run: yarn install
    

    For more details on caching behaviour, please refer Caching packages data – Setup-Node documentation.
    Let us know if you have any questions or need further assistance!

    Hi @malice00, please try the suggestions above to disable caching or to ensure dependencies are installed before caching.
    If the issue persists after trying these steps, could you please share your workflow file or a reproduction link? This will help us investigate the issue and assist you further.

  8. deviantintegral commented on Sep 11, 2025

    @deviantintegral
    deviantintegral
    on Sep 11, 2025
    Author
    More actions

    but if the required paths are missing because the dependencies haven’t been installed yet, you may see the message "no cache is being saved."

    Can this instead be downgraded to a warning or info message? It seems strict to throw an error, given there's no dependencies to be saved and nothing to be gained with a cache.

  9. submarines-and commented on Sep 15, 2025

    @submarines-and
    submarines-and
    on Sep 15, 2025
    More actions

    Hi @deviantintegral, Thank you for reporting this issue and providing the details. Starting with actions/setup-node@v5, caching is enabled by default when a packageManager field is present in the package.json file, even if no cache inputs have been explicitly set in the workflow. For more information, please refer to this setup-node documentation.

    A common scenario is to only run e.g. yarn install if needed. Ideally, this should not then crash the build.

  10. v-gowridurgad commented on Sep 16, 2025

    @v-gowridurgad
    v-gowridurgad
    on Sep 16, 2025
    Contributor
    More actions

    Hi @deviantintegral,
    The error/warning handling for cache path validation is actually managed by the underlying actions/toolkit repository, rather than by setup-node itself.
    To request changing this behaviour from an error to a warning, could you please open an issue in the actions/toolkit repo? That would be the best place for this type of change to be discussed and considered.

    Hi @submarines-and, thanks for pointing that out! This is indeed a common pattern. When a packageManager is specified in package.json, actions/setup-node@v5 automatically enables caching. If yarn install is skipped, the expected cache paths don't exist, which results in a path validation error during the post-run step. This is currently expected behaviour, as the action attempts to cache dependencies that aren’t there.
    To prevent the build from failing in this scenario, you can either:

    1. Disable caching explicitly using package-manager-cache: false.
    2. Ensure dependencies are installed before the caching step runs.
      If you think this should be handled more gracefully, opening an issue in the actions/toolkit repo would be the best way to propose that change
    Reacted by Andrew Berry
  11. mjfwebb
    added 2 commits that reference this issue on Sep 16, 2025

    fix: install packages before setting up node

    467e0b4

    fix: install packages before setting up node (#759)

    dd17bfb
  12. deviantintegral commented on Sep 17, 2025

    @deviantintegral
    deviantintegral
    on Sep 17, 2025
    Author
    More actions

    Thanks @gowridurgad , I filed actions/toolkit#2128 for this.

    Reacted by v-gowridurgad
  13. mjfwebb
    added a commit that references this issue on Sep 18, 2025

    build: manage actions/setup-node caching

    abfceb1
  14. v-gowridurgad commented on Sep 22, 2025

    @v-gowridurgad
    v-gowridurgad
    on Sep 22, 2025
    Contributor
    More actions

    Hi @submarines-and , Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know.

  15. v-gowridurgad commented on Sep 26, 2025

    @v-gowridurgad
    v-gowridurgad
    on Sep 26, 2025
    Contributor
    More actions

    Hi @deviantintegral, We wanted to follow up and share that, to improve stability and reduce unexpected errors, we've updated the default behaviour for automatic caching in setup-node@v5. Automatic caching is now enabled by default only for npm, as introduced in PR #1374.

    For other package managers like pnpm and yarn, caching is now disabled by default. If you'd still like to use caching with pnpm or yarn, you can enable it explicitly by setting the cache input in your workflow.

    With this update, the issue you reported should no longer occur. We're going to close this issue for now. If you have further questions or need assistance in the future, please feel free to reopen this issue or create a new one.
    Thank you!

  16. v-gowridurgad
    closed this as completedon Sep 26, 2025
  17. deviantintegral commented on Sep 26, 2025

    @deviantintegral
    deviantintegral
    on Sep 26, 2025
    Author
    More actions

    Thanks for the followup. I don't see any commits or PRs though with the changes? And the v5 release appears to be unchanged as well.

  18. Ionaru
    added a commit that references this issue on Oct 10, 2025

    Fix setup-node post error: actions/setup-node#1363 (comment)

    806498d
  19. v-gowridurgad commented on Oct 28, 2025

    @v-gowridurgad
    v-gowridurgad
    on Oct 28, 2025
    Contributor
    More actions

    Hi @deviantintegral, Thanks for your patience! We’ve merged the PR that updates the default caching behavior and released setup-node v6. This version should resolve the Path Validation Error you encountered in v5. Please update to v6 and validate your workflow to confirm that the error is resolved.

  20. deviantintegral commented on Oct 30, 2025

    @deviantintegral
    deviantintegral
    on Oct 30, 2025
    Author
    More actions

    @gowridurgad yes, it worked perfectly for us. Thanks!

    Reacted by v-gowridurgad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @v-gowridurgad
    v-gowridurgad

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.