Git Product home page Git Product logo

Comments (23)

echocrow avatar echocrow commented on May 26, 2024 15

@jyono The spike is probably related to the pnpm v8 release just a few hours ago, which seems to require a new lockfile version when installing with --frozen-lockfile (which some CI/CD environments default to).

We ran into this issue too, because our CI/CD was pulling the latest pnpm version. Earlier today, that was v7, until this switched to v8, breaking our builds due to the unsupported lockfile version.

Locally installing pnpm v8 and updating the lockfile (as per above posts) worked.

Alternatively, you can also fix your pnpm version to pnpm@^7 and stick with the old lockfile.

from action-setup.

ramnes avatar ramnes commented on May 26, 2024 10

You need to update pnpm before running it :)

from action-setup.

PaulRBerg avatar PaulRBerg commented on May 26, 2024 4

Same error! Running pnpm i --fix-lockfile does not change the lockfile, but in CI I keep getting an error.

This is with a project that has a peer dependency listed like this:

"peerDependencies": {
  "@ethersproject/bignumber": "5.x"
},

from action-setup.

PaulRBerg avatar PaulRBerg commented on May 26, 2024 4

Yeah, I was on v7.30.1. After upgrading to v8, I can confirm that running --fix-lockfile fixed the issue.

Thanks for your help, @ramnes.

from action-setup.

talik077 avatar talik077 commented on May 26, 2024 4

Same here. Upgraded from pnpm v7 to v8 and fixing the lock file using the --fix-lockfile option fixed the issue

from action-setup.

jyono avatar jyono commented on May 26, 2024 4

same problem today. this worked for us.

  • corepack prepare pnpm@latest --activate
  • corepack enable
  • pnpm -v should see 8.0.0
  • pnpm i --fix-lockfile

not sure exactly what caused this but maybe something upstream? it feels suspicious that this issue had comments September 2022 and now there's a lot more traffic today...

from action-setup.

PaulRBerg avatar PaulRBerg commented on May 26, 2024 3

I guess the takeaway from this issue is to always use specific versions of external dependencies in CI.

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024 1

npm i --fix-lockfile

Can you try pnpm i --fix-lockfile?

from action-setup.

jonraem avatar jonraem commented on May 26, 2024 1

Just encountered the same issue in Azure Pipelines. I can also confirm that updating from pnpm 7 to 8 and fixing the lockfile again worked for me.

from action-setup.

pinalbhatt avatar pinalbhatt commented on May 26, 2024

@KSXGitHub

pnpm i --fix-lockfile
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  [email protected][email protected][email protected] isn't supported by any available resolver.

This error happened while installing the dependencies of [email protected]
Progress: resolved 28, reused 29, downloaded 0, added 0

Note that npm i --legacy-peer-deps works fine when using npm.

from action-setup.

pinalbhatt avatar pinalbhatt commented on May 26, 2024

For now i have fixed issue by adding following to my .npmrc file

auto-install-peers=true

strict-peer-dependencies=false

from action-setup.

zkochan avatar zkochan commented on May 26, 2024

and when try to fix my lockfile locally with command npm i --fix-lockfile i get following error:

Why do you run npm i if you use pnpm?

You should run pnpm install and commit the lockfile.

from action-setup.

Innei avatar Innei commented on May 26, 2024

Is you using latest pnpm the version of 7.x?

from action-setup.

liuzhaowei55 avatar liuzhaowei55 commented on May 26, 2024

the same error

➜  toolbox git:(master) pnpm i --fix-lockfile
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  [email protected][email protected] isn't supported by any available resolver.

from action-setup.

liuzhaowei55 avatar liuzhaowei55 commented on May 26, 2024

the same error

➜  toolbox git:(master) pnpm i --fix-lockfile
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  [email protected][email protected] isn't supported by any available resolver.

rerun pnpm install and commit the lockfile, its ok

from action-setup.

damiangreen avatar damiangreen commented on May 26, 2024

the same error with node-fetch

I have this in my resolutions

"node-fetch": "@2.6.7",
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  node-fetch@@2.6.7 isn't supported by any available resolver.

This error happened while installing the dependencies of [email protected]

from action-setup.

bartvanremortele avatar bartvanremortele commented on May 26, 2024

Same error here.

➜  pnpm i --fix-lockfile
Scope: all 10 workspace projects
.../apps/app:
 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  [email protected][email protected] isn't supported by any available resolver.

This error happened while installing the dependencies of @hookform/[email protected]
Progress: resolved 309, reused 309, downloaded 0, added 0

getting this in CI:

Scope: all 10 workspace projects
Lockfile is up to date, resolution step is skipped
 ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with apps/app/package.json

Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

from action-setup.

echocrow avatar echocrow commented on May 26, 2024

I guess the takeaway from this issue is to always use specific versions of external dependencies in CI.

(+1, ironically also why the lockfiles in question exist)

from action-setup.

njleonzhang avatar njleonzhang commented on May 26, 2024

pnpm lock is incompatible between v7 and v8? any plan to fix?

from action-setup.

echocrow avatar echocrow commented on May 26, 2024

@njleonzhang probably better to open a separate issue or discussion on this. but from my understanding, pnpm v8 can read lockfile v5 (used by pnpm v7) , and will automatically upgrade them to lockfile v6 when running pnpm install. (This is also stated in their v8 migration instructions.)

the recent comments in this issue arose from running pnpm install --frozen-lockfile (which prohibits updates to the lockfile) with pnpm v8 while still using a lockfile v5.

from action-setup.

exsesx avatar exsesx commented on May 26, 2024

I have a @formkit/auto-animate dependency, version 1.0.0-beta.6, pnpm version 8.1.0

I'm getting the ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER  @formkit@[email protected] isn't supported by any available resolver. error in CI.

from action-setup.

jyono avatar jyono commented on May 26, 2024

@jyono The spike is probably related to the pnpm v8 release just a few hours ago, which seems to require a new lockfile version when installing with --frozen-lockfile (which some CI/CD environments default to).

We ran into this issue too, because our CI/CD was pulling the latest pnpm version. Earlier today, that was v7, until this switched to v8, breaking our builds due to the unsupported lockfile version.

Locally installing pnpm v8 and updating the lockfile (as per above posts) worked.

Alternatively, you can also fix your pnpm version to pnpm@^7 and stick with the old lockfile.

thanks!

from action-setup.

so1ve avatar so1ve commented on May 26, 2024

Summary:
Use corepack to manage package manager is the best choice. This enforces the same manager in different environments. For example, you are running pnpm@7 locally but pnpm@8 in ci, the lockfile format will break the installation. So, please make sure you have packageManager field defined in your package.json instead of specifing a pnpm version in the workflow file manually.

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.