Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path Validation Error: Path(s) specified in the action for caching does not exist #1137

Open
2 of 5 tasks
yashsway opened this issue Sep 18, 2024 · 1 comment
Open
2 of 5 tasks
Labels
bug Something isn't working

Comments

@yashsway
Copy link

Description:
Getting a strange error in the "Post setup node.js" step in my GitHub workflow. I ran the workflow with debugging enabled and this step fails with this 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:
v3 as uses: actions/setup-node@v3

Platform:

  • Ubuntu (ubuntu-latest)
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
pnpm ("packageManager": "[email protected]" in package.json at the root of my monorepo)

Repro steps:
This is my GitHub action.

name: Release (Private Packages)
on:
  push:
    branches:
      - master
    paths:
      - ".changeset/**"
      - ".github/workflows/packages-release.yml"
  workflow_dispatch:
env:
  CI: true
  PNPM_CACHE_FOLDER: .pnpm-store
jobs:
  version_or_release:
    name: 'Version and open PR (or) release private packages'
    timeout-minutes: 15
    runs-on: ubuntu-latest
    environment: 'Production - Private Packages'
    steps:
      - name: checkout code repository
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: pnpm/action-setup@v4
      - name: setup node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: 'pnpm'
      - name: setup pnpm store config
        run: pnpm config set store-dir $PNPM_CACHE_FOLDER
      - name: install dependencies
        run: pnpm install --frozen-lockfile
      - name: setup npmrc file to configure pnpm
        run: |
          cat << EOF > "$HOME/.npmrc"
            @mycompany:registry=https://npm.pkg.github.com
            //npm.pkg.github.com/:_authToken=$NPM_PUBLISH_TOKEN
            //registry.npmjs.org/:_authToken=null
          EOF
        env:
          NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
          HOME: ${{ github.workspace }}
      - name: create and publish versions
        uses: changesets/action@v1
        with:
          cwd: ${{ github.workspace }}
          version: pnpm run version
          commit: "chore: update package versions"
          title: "Release (Private Packages)"
          publish: pnpm run publish:ci
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          HOME: ${{ github.workspace }}

Expected behavior:
Not really sure what is actually supposed to happen here.

Actual behavior:
With debugging enabled, this is the full trace for the step:

0s
##[debug]Evaluating condition for step: 'Post setup node.js'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post setup node.js
##[debug]Loading inputs
##[debug]Evaluating: (((github.server_url == 'https://github.com') && github.token) || '')
##[debug]Evaluating Or:
##[debug]..Evaluating And:
##[debug]....Evaluating Equal:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'server_url'
##[debug]......=> 'https://github.com'
##[debug]......Evaluating String:
##[debug]......=> 'https://github.com'
##[debug]....=> true
##[debug]....Evaluating Index:
##[debug]......Evaluating github:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'token'
##[debug]....=> ''
##[debug]..=> '
'
##[debug]=> ''
##[debug]Expanded: ((('https://github.com' == 'https://github.com') && '
') || '')
##[debug]Result: '***'
##[debug]Loading env
Post job cleanup.
##[debug]Checking zstd --quiet --version
##[debug]1.5.6
##[debug]zstd version: 1.5.6
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/setup-pnpm/node_modules/.bin/store/v3'
##[debug]Cache Paths:
##[debug][]
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Post setup node.js

@yashsway yashsway added bug Something isn't working needs triage labels Sep 18, 2024
@priyagupta108
Copy link
Contributor

Hi @yashsway 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants