GithubHelp home page GithubHelp logo

Comments (29)

fvictorio avatar fvictorio commented on August 22, 2024 131

Upgrading the action to v4 seems to fix this:

        uses: pnpm/action-setup@v4

from action-setup.

dvins avatar dvins commented on August 22, 2024 12

Appreciate that upgrading to v4.0.0 may solve the problem, but addressing this in dozens of GitHub workflows on a US Holiday is a nightmare. To say nothing of dozens of broken builds that cannot be reinitiated after the workflow change. What caused this to break? Can it be restored?

from action-setup.

shreyas-iyer avatar shreyas-iyer commented on August 22, 2024 10

Seeing this as well with version: 8.11.0. Was totally fine a couple hours ago.

from action-setup.

liby avatar liby commented on August 22, 2024 7

Appreciate that upgrading to v4.0.0 may solve the problem, but addressing this in dozens of GitHub workflows on a US Holiday is a nightmare. To say nothing of dozens of broken builds that cannot be reinitiated after the workflow change. What caused this to break? Can it be restored?

It seems that this issue may be related to the fetch API. Currently, pnpm/action-setup@v2 is using Node.js@v16, which has reached its EOL. It is also possible that GitHub Actions have abandoned the use of this version and fallback to a higher version. The above is just speculation.

from action-setup.

zkochan avatar zkochan commented on August 22, 2024 6

Fixed in 2.4.1 https://github.com/pnpm/action-setup/releases/tag/v2.4.1

from action-setup.

funayamateppei avatar funayamateppei commented on August 22, 2024 2

@bobinfra1006

I change my pnpm/action-setup@v4,but still error.
Error: Multiple versions of pnpm specified:
Error: Error: Multiple versions of pnpm specified:

  • version 8.11.0 in the GitHub Action config with the key "version"
  • version [email protected] in the package.json with the key "packageManager"
    Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
  • version 8.11.0 in the GitHub Action config with the key "version"
  • version [email protected] in the package.json with the key "packageManager"
    Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
    at readTarget (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:4528)
    at runSelfInstaller (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:3742)
    at async install (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:2976)
    at async main (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:444)

Here is a possible issue where the pnpm version specified in the package.json does not match the version specified in the GitHub Action configuration.
I encountered the same issue, but I was able to resolve it by aligning the pnpm version specified in the package.json with the version specified in the GitHub Actions configuration.

from action-setup.

martin-luo avatar martin-luo commented on August 22, 2024 2

Upgrading the action to v4 seems to fix this:

        uses: pnpm/action-setup@v4

Upgrading to v4 works for us, thanks @fvictorio !

from action-setup.

nubunto avatar nubunto commented on August 22, 2024 2

only the modern javascript ecosystem can have software be broken absolutely out of nowhere

from action-setup.

craftyc0der avatar craftyc0der commented on August 22, 2024 1

upgrading to v4 fixes this for me

from action-setup.

cactusanil avatar cactusanil commented on August 22, 2024 1

This fix worked when jumping from pnpm/action-setup@v2 . Thanks @fvictorio !

from action-setup.

RihanArfan avatar RihanArfan commented on August 22, 2024 1

It seems that this issue may be related to the fetch API. Currently, pnpm/action-setup@v2 is using Node.js@v16, which has reached its EOL. It is also possible that GitHub Actions have abandoned the use of this version and fallback to a higher version. The above is just speculation.

Adding to this, GitHub deprecated Node.js v16 (EOL) last year and there should've been warnings since 23 Oct 2023. https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

To stop this from happening again, setup Dependabot/Renovate to update your GitHub Actions.

from action-setup.

sonam-serchan avatar sonam-serchan commented on August 22, 2024 1

Failed with pnpm version:9 as well for us.

Upgrading action to 4 worked!!!

from action-setup.

haq204 avatar haq204 commented on August 22, 2024

can confirm seeing the issue as on 8.11.0

from action-setup.

jmcgrath207 avatar jmcgrath207 commented on August 22, 2024

Upgrading the action to v4 seems to fix this:

        uses: pnpm/action-setup@v4

This fix worked when jumping from pnpm/action-setup@v2 . Thanks @fvictorio !

from action-setup.

chris24sahadeo avatar chris24sahadeo commented on August 22, 2024

Also got this error on v2. v4 fixes it

from action-setup.

nhuray avatar nhuray commented on August 22, 2024

We also upgrade to v4 and it resolves the issue !

from action-setup.

jieey1140 avatar jieey1140 commented on August 22, 2024
        uses: pnpm/[email protected]

This was also resolved on Ubuntu 22.04 + k8s self-host-runner by upgrading the pnpm-action version to 4.0.0 !

Thank you! @fvictorio

from action-setup.

alokVishu avatar alokVishu commented on August 22, 2024

image

from action-setup.

dvins avatar dvins commented on August 22, 2024

This fix worked when jumping from pnpm/action-setup@v2 . Thanks @fvictorio !

Unfortunately it's not a fix, its a work around that only affects new workflow runs. In our case, we have dozens of GitHub workflows in a stuck state because of whatever deprecated the ability to use v2 version did so without warning. Upgrading to v4 action does not solve the problem because there is no way to affect the stuck GitHub workflow instances.

from action-setup.

bobinfra1006 avatar bobinfra1006 commented on August 22, 2024

I change my pnpm/action-setup@v4,but still error。
Error: Multiple versions of pnpm specified:
Error: Error: Multiple versions of pnpm specified:
- version 8.11.0 in the GitHub Action config with the key "version"
- version [email protected] in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
- version 8.11.0 in the GitHub Action config with the key "version"
- version [email protected] in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION
at readTarget (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:4528)
at runSelfInstaller (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:3742)
at async install (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:2976)
at async main (/home/runner/work/_actions/pnpm/action-setup/v4/dist/index.js:1:444)
image

from action-setup.

liby avatar liby commented on August 22, 2024

It seems that this issue may be related to the fetch API. Currently, pnpm/action-setup@v2 is using Node.js@v16, which has reached its EOL. It is also possible that GitHub Actions have abandoned the use of this version and fallback to a higher version. The above is just speculation.

Adding to this, GitHub deprecated Node.js v16 (EOL) last year and there should've been warnings since 23 Oct 2023. github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20

To stop this from happening again, setup Dependabot/Renovate to update your GitHub Actions.

According to the latest related GitHub Actions Blog mentioned:

On June 30th 2024, we will change the default from Node16 to Node20.
To opt out of this and continue using Node16 while it is still available in the runner, you can choose to set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true

But the statement here is still ambiguous, without clarifying whether if using: node16 is set but ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true is not set, will this Actions runner fallback to node20 or use node16.

from action-setup.

pierre-charles avatar pierre-charles commented on August 22, 2024

To add to this, this was suggested several pipelines, I noticed it yesterday and left it my todo list only to then realise it had to be done very soon

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2

from action-setup.

zkochan avatar zkochan commented on August 22, 2024

It must be an issue with a newer Node.js version. I remember fixing the same error in pnpm. But I am afraid to touch the v2 version of this action. Better to upgrade it in your action (or downgrade Node.js).

from action-setup.

zkochan avatar zkochan commented on August 22, 2024

I can upgrade the pnpm bundled with the v2 of action to v7 but in that case it will stop working with node.js v12: #138

from action-setup.

CollinHerber avatar CollinHerber commented on August 22, 2024

Are we getting a fix for this in the v4 and v3 versions of the action? I am seeing this with 9.4.0 of pnpm and v4 of the action.

from action-setup.

zkochan avatar zkochan commented on August 22, 2024

This issue was reproducible only in v2 of the action as far as I can tell. As you can see, everyone is upgrading to v4 to fix the issue.

from action-setup.

CollinHerber avatar CollinHerber commented on August 22, 2024

I've triple checked that I'm using v4 . I'm even using the direct commit hash instead of just v4 and still seeing this.

from action-setup.

zkochan avatar zkochan commented on August 22, 2024

@CollinHerber do you have a link to the action? If no, you can just use corepack instead to install pnpm. Like here:

https://github.com/pnpm/pnpm.io/blob/6e37a4afdf6cac6dbe37b8e3aea709ce85efaa77/.github/workflows/ci.yml#L19-L22

from action-setup.

quantuminformation avatar quantuminformation commented on August 22, 2024

any quick fix for
image

from action-setup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.