GithubHelp home page GithubHelp logo

Comments (19)

zkochan avatar zkochan commented on June 15, 2024 2

I have found the issue. I'll make a fix.

The issue was caused by this PR: #7715

Specifically, this code is problematic:

if (!options.update && currentPkg.version && currentPkg.pkgId?.endsWith(`@${currentPkg.version}`)) {
wantedDependency.pref = currentPkg.version
}

from pnpm.

zkochan avatar zkochan commented on June 15, 2024 1

I can reproduce the issue on that PR if I run pnpm install --lockfile-only.

from pnpm.

duveborg avatar duveborg commented on June 15, 2024

I have the same issue

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

Could you reproduce it with public packages, so that we can debug it?

I have tried this:

pn add core@npm:@pnpm/core

It worked correctly

from pnpm.

dmitriy-kudelko avatar dmitriy-kudelko commented on June 15, 2024

Nope, I wasn't able to reproduce this with public packages. I tried ui-kit@npm:lodash before posting the issue and it worked as usual.

from pnpm.

dmitriy-kudelko avatar dmitriy-kudelko commented on June 15, 2024

It's worth mentioning that for aliases that don't clash with public package names pnpm@9 works fine either, e.g. we use a similar api-kit alias which doesn't cause any issues.

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

I have tried to reproduce it with private packages but it seems to work.

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

Is it inside a workspace?

from pnpm.

dmitriy-kudelko avatar dmitriy-kudelko commented on June 15, 2024

No, it's not a workspace, just a regular repo.
Also, I noticed that it only happens when a resolution step is performed.

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

Does that specific version exist for @org/repo? Maybe the error message is incorrect but the issue is real.

from pnpm.

dmitriy-kudelko avatar dmitriy-kudelko commented on June 15, 2024

It does exist. It wasn't changed in package.json.
The only change was installing pnpm@9 via brew.

And after rolling back to pnpm@8 it works fine:

npm show @org/[email protected]

@org/[email protected] | ISC | deps: 32 | versions: 379

...

from pnpm.

JoeKarow avatar JoeKarow commented on June 15, 2024

I've been experiencing this with aliasing eslint-plugin-node as eslint-plugin-n. For some reason, I cannot reproduce this locally on my machine, but I have been getting these errors when Renovate tries to do a PR.

package.json entry: "eslint-plugin-node": "npm:[email protected]",

Relevant PR comment

Error details from PR comment
Scope: all 15 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 56, reused 0, downloaded 0, added 0
Progress: resolved 123, reused 0, downloaded 0, added 0
Progress: resolved 154, reused 0, downloaded 0, added 0
Progress: resolved 186, reused 0, downloaded 0, added 0
/tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config:
 ERR_PNPM_NO_MATCHING_VERSION  No matching version found for [email protected]

This error happened while installing a direct dependency of /tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config

The latest release of eslint-plugin-node is "11.1.0".

Other releases are:
  * old: 4.2.3
  * next: 7.0.0-beta.0

If you need the full list of all 60 published versions run "$ pnpm view eslint-plugin-node versions".
Error message from Renovate job log
DEBUG: rawExec err (branch="renovate/all-minor-patch")
{
  "baseBranch": "dev"
  "err": {
    "cmd": "/bin/sh -c pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile",
    "stderr": "",
    "stdout": "Scope: all 15 workspace projects\nProgress: resolved 1, reused 0, downloaded 0, added 0\nProgress: resolved 56, reused 0, downloaded 0, added 0\nProgress: resolved 123, reused 0, downloaded 0, added 0\nProgress: resolved 154, reused 0, downloaded 0, added 0\nProgress: resolved 186, reused 0, downloaded 0, added 0\n/tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config:\n ERR_PNPM_NO_MATCHING_VERSION  No matching version found for [email protected]\n\nThis error happened while installing a direct dependency of /tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config\n\nThe latest release of eslint-plugin-node is \"11.1.0\".\n\nOther releases are:\n  * old: 4.2.3\n  * next: 7.0.0-beta.0\n\nIf you need the full list of all 60 published versions run \"$ pnpm view eslint-plugin-node versions\".\n",
    "options": {
      "cwd": "/tmp/renovate/repos/github/weareinreach/InReach",
      "encoding": "utf-8",
      "env": {
        "NPM_CONFIG_CACHE": "/tmp/renovate/cache/others/npm",
        "npm_config_store": "/tmp/renovate/cache/others/pnpm",
        "HOME": "/home/ubuntu",
        "PATH": "/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "LC_ALL": "C.UTF-8",
        "LANG": "C.UTF-8",
        "CONTAINERBASE_CACHE_DIR": "/tmp/renovate/cache/containerbase"
      },
      "maxBuffer": 10485760,
      "timeout": 900000
    },
    "exitCode": 1,
    "name": "ExecError",
    "message": "Command failed: pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\n",
    "stack": "ExecError: Command failed: pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\n\n    at ChildProcess.<anonymous> (/usr/local/renovate/lib/util/exec/common.ts:99:11)\n    at ChildProcess.emit (node:events:529:35)\n    at ChildProcess.emit (node:domain:489:12)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:292:12)"
  }
  "durationMs": 5520
}

DEBUG: lock file error (branch="renovate/all-minor-patch")
{
  "baseBranch": "dev"
  "commands": [
    "pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile",
    "pnpm dedupe --config.ignore-scripts=true"
  ]
  "err": {
    "cmd": "/bin/sh -c pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile",
    "stderr": "",
    "stdout": "Scope: all 15 workspace projects\nProgress: resolved 1, reused 0, downloaded 0, added 0\nProgress: resolved 56, reused 0, downloaded 0, added 0\nProgress: resolved 123, reused 0, downloaded 0, added 0\nProgress: resolved 154, reused 0, downloaded 0, added 0\nProgress: resolved 186, reused 0, downloaded 0, added 0\n/tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config:\n ERR_PNPM_NO_MATCHING_VERSION  No matching version found for [email protected]\n\nThis error happened while installing a direct dependency of /tmp/renovate/repos/github/weareinreach/InReach/packages/eslint-config\n\nThe latest release of eslint-plugin-node is \"11.1.0\".\n\nOther releases are:\n  * old: 4.2.3\n  * next: 7.0.0-beta.0\n\nIf you need the full list of all 60 published versions run \"$ pnpm view eslint-plugin-node versions\".\n",
    "options": {
      "cwd": "/tmp/renovate/repos/github/weareinreach/InReach",
      "encoding": "utf-8",
      "env": {
        "NPM_CONFIG_CACHE": "/tmp/renovate/cache/others/npm",
        "npm_config_store": "/tmp/renovate/cache/others/pnpm",
        "HOME": "/home/ubuntu",
        "PATH": "/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.local/bin:/go/bin:/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "LC_ALL": "C.UTF-8",
        "LANG": "C.UTF-8",
        "CONTAINERBASE_CACHE_DIR": "/tmp/renovate/cache/containerbase"
      },
      "maxBuffer": 10485760,
      "timeout": 900000
    },
    "exitCode": 1,
    "name": "ExecError",
    "message": "Command failed: pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\n",
    "stack": "ExecError: Command failed: pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\n\n    at ChildProcess.<anonymous> (/usr/local/renovate/lib/util/exec/common.ts:99:11)\n    at ChildProcess.emit (node:events:529:35)\n    at ChildProcess.emit (node:domain:489:12)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:292:12)"
  }
  "type": "pnpm"
}

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

Might be an issue that happens when pnpm tries to convert the previous lockfile format to v9. If you remove node_modules and the lockfile and run install to generate a lockfile from scratch, then it works.

from pnpm.

JoeKarow avatar JoeKarow commented on June 15, 2024

Might be an issue that happens when pnpm tries to convert the previous lockfile format to v9. If you remove node_modules and the lockfile and run install to generate a lockfile from scratch, then it works.

Hmm, but the lockfile on the base branch that renovate is creating the PR based off of is already lockfileVersion: '9.0'.

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

🚢 9.0.4

from pnpm.

RikoRodriges avatar RikoRodriges commented on June 15, 2024

It seems the problem has not gone away, lock is overwritten every time when installing

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

I don't understand what you mean. The fix described in the issue has been fixed. If you have a different issue, file a new issue with steps to reproduce.

from pnpm.

levrik avatar levrik commented on June 15, 2024

I'm still getting ERR_PNPM_NO_MATCHING_VERSION when installing using --lockfile-only and package.json being updated before. It looks like Renovate Bot is doing this internally because all dependency update jobs are failing due to this bug within pnpm now. I'm having "react-beautiful-dnd": "npm:aligned-rbd" in my package.json. When changing the version number of any other dependency and then executing pnpm install --lockfile-only it triggers the above error.

I was able to work around it by replacing "react-beautiful-dnd": "npm:aligned-rbd" with "react-beautiful-dnd": "npm:[email protected]". The explicit version seems to help.

from pnpm.

zkochan avatar zkochan commented on June 15, 2024

ok, use pnpm v8 for now.

from pnpm.

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.