Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

v5 fails immediately when using `pnpm`

オープン
#1,357 コメント 39 件 リアクション 31 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, node.js, typescript
領域
ci-cd, tooling

調査の方向性

.github/actions/restore ワークフロー、actions/setup-node v5 の呼び出し、そして package.json の packageManager フィールドから始め、Ubuntu 上で v4 と v5 の参照の違いを再現します。corepack ステップ周辺の package-manager-cache の挙動を調査し、v5 ワークフローが実行可能ファイルが見つからないエラーなしで明示的な corepack および pnpm コマンドに到達した時点で、この問題が解決したと判断します。

索引モデルが issue の本文から書いたものです。

説明

bug

Description:
I'm using corepack to install pnpm. Using v5 the action fails immediately, afaict doesn't even make it to the corepack step.

Action version:
v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

  "engines": {
    "node": "24.7.0"
  },
  "packageManager": "[email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"

Repro steps:

name: restore

runs:
  using: composite
  steps:
    - name: Install Node.js
      #uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
      uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
      with:
        node-version-file: package.json

    - name: Install pnpm
      shell: bash
      run: |
        corepack enable
        corepack prepare --activate

    - name: Export pnpm store path
      shell: bash
      run: |
        echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

    - name: Setup pnpm cache
      uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
      with:
        path: ${{ env.STORE_PATH }}
        key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
        restore-keys: |
          ${{ runner.os }}-pnpm-store-

    - name: Install dependencies
      shell: bash
      run: pnpm install --frozen-lockfile

    - name: Store prune
      shell: bash
      run: pnpm store prune
Prepare all required actions
Getting action download info
Download action repository 'actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444' (SHA:a0853c24544627f65ddf259abe73b1d18a591444)
Download action repository 'actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809' (SHA:0400d5f644dc74513175e3cd8d07132dd4860809)
Run ./.github/actions/restore
Run actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
  with:
    node-version-file: package.json
    always-auth: false
    check-latest: false
    token: ***
    package-manager-cache: true
Resolved package.json as 24.7.0
Attempting to download 24.7.0...
(node:1991) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Acquiring 24.7.0 - x64 from https://github.com/actions/node-versions/releases/download/24.7.0-17283839804/node-24.7.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/32676364-91bc-4278-a2bc-700823b9c0d4 -f /home/runner/work/_temp/96a07732-bdfd-4e82-a07c-8a2a6550709e
Adding to the cache ...
Environment details
  node: v24.7.0
  npm: 11.5.1
  yarn: 1.22.22
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.

Expected behavior:

Using v4 everything works as expected:

Prepare all required actions
Getting action download info
Download action repository 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' (SHA:49933ea5288caeca8642d1e84afbd3f7d6820020)
Download action repository 'actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809' (SHA:0400d5f644dc74513175e3cd8d07132dd4860809)
Run ./.github/actions/restore
Run actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
Resolved package.json as 24.7.0
Attempting to download 24.7.0...
Acquiring 24.7.0 - x64 from https://github.com/actions/node-versions/releases/download/24.7.0-17283839804/node-24.7.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/5be513fa-45a1-4cbf-b962-41ec7d0b828f -f /home/runner/work/_temp/1b86ae81-2e8a-4a03-bb71-adb4c43b321f
Adding to the cache ...
Environment details
  node: v24.7.0
  npm: 11.5.1
  yarn: 1.22.22
Run corepack enable
  corepack enable
  corepack prepare --activate
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Preparing [email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67 for immediate activation...
Run echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
Run actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
Cache hit for restore-key: Linux-pnpm-store-b7d2050696ee54d49a8aad9d2b825770a2ccafcb302f1fb77ebbe74d6ce0757b
Received 134217728 of 153022715 (87.7%), 120.0 MBs/sec
Received 153022715 of 153022715 (100.0%), 117.9 MBs/sec
Cache Size: ~146 MB (153022715 B)
/usr/bin/tar -xf /home/runner/work/_temp/43de40db-0b79-4b5b-b9a3-f8da86ea6973/cache.tzst -P -C /home/runner/work/website/website --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-pnpm-store-b7d2050696ee54d49a8aad9d2b825770a2ccafcb302f1fb77ebbe74d6ce0757b
Run pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +810
...

Actual behavior:
Action fails immediately.

主要言語
TypeScript
スター
5k
フォーク
1.7k
平均マージ
2日 11時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

actions/setup-node のほかの issue

actions/setup-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。