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

Error: Unable to locate executable file: pnpm #530

Closed
2 of 5 tasks
TechQuery opened this issue Jun 28, 2022 · 2 comments
Closed
2 of 5 tasks

Error: Unable to locate executable file: pnpm #530

TechQuery opened this issue Jun 28, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@TechQuery
Copy link

Description

I was migrating my Yarn Project to PNPM, but my GitHub actions crashed with actions/setup-node.

Action version

v2 & v3

Platform

  • Ubuntu
  • macOS
  • Windows

Runner type

  • Hosted
  • Self-hosted

Tools version

PNPM 7.3.0

Repro steps

My migration of Workflow YAML shown below:

name: CI & CD
on:
    push:
        branches:
            - master
jobs:
    Build-and-Deploy:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3
            - uses: actions/setup-node@v3
              with:
                  node-version: 14
-                 cache: yarn
+                 cache: pnpm
            - name: Install & Build
-             run: yarn  &&  yarn build
+             run: pnpm i  &&  pnpm build

Expected behavior

Actions run successfully as Yarn cached version

Actual behavior

Error thrown:

Found in cache @ /opt/hostedtoolcache/node/14.19.3/x64
Error: Unable to locate executable file: pnpm. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

If I disable PNPM cache and install PNPM manually, it works for now:

name: CI & CD
on:
    push:
        branches:
            - master
jobs:
    Build-and-Deploy:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3
            - uses: actions/setup-node@v3
              with:
                  node-version: 14
-                 cache: pnpm
+           - name: Install PNPM
+             run: npm i -g pnpm
            - name: Install & Build
              run: pnpm i  &&  pnpm build
@TechQuery TechQuery added bug Something isn't working needs triage labels Jun 28, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @TechQuery. Thank you for your report. It's an expected behaviour because pnpm should be preinstalled before the setup-node action. Please refer to the documentation for pnpm caching.

For now I'm going to close the issue.

@TechQuery
Copy link
Author

@dmitry-shibanov , thanks for your answer, I fixed it with the Advanced Document.

alecandido added a commit to NNPDF/pineline that referenced this issue Oct 16, 2022
saltchess pushed a commit to saltchess/buaa-ncov that referenced this issue Nov 8, 2022
binary64 added a commit to binary64/blabber that referenced this issue May 12, 2023
athdromeda added a commit to athdromeda/portfolio that referenced this issue Aug 15, 2023
deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
…ions#530)

Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.9.0 to 9.0.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-config-prettier@v8.9.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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