Skip to content

requires semver: No matching version found inside the workspace  #4567

Closed

Description

@milahu

pnpm version: 6.32.6

Code to reproduce the issue:

#! /usr/bin/env bash

( set -e

version=1 # breaks pnpm
#version=1.0 # breaks pnpm
#version=1.0.0 # works with pnpm -> pnpm requires semver for workspace packages (?)

function pkg_jq() {
  # yes i know sponge. this is portable
  cat package.json | jq "$@" >package.json.1
  mv package.json.1 package.json
}

cd $(mktemp -d)

rm -rf packages # WARNING ...

mkdir packages || true
( cd packages

mkdir a
( cd a
#pnpm init -y
echo '{"name":"a","version":"'$version'"}' | jq -r >package.json
)

mkdir b
( cd b
#pnpm init -y
echo '{"name":"b","version":"'$version'"}' | jq -r >package.json

pnpm add "a@workspace:$version"
#pkg_jq '.dependencies.a = "workspace:'$version'"' && pnpm install
)

) # cd packages
) # set -e

Actual behavior:

$ ./create.sh 
Scope: all 3 workspace projects
 ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE  In : No matching version found for a@1 inside the workspace

Expected behavior:

should support float versions like 1.0 and integer versions like 1

Activity

  1. qRoC commented on Oct 13, 2024

    @qRoC

    Thank you! I spent a lot of time to understand why pnpm does not see my local package

  2. altaywtf commented on Sep 23, 2026

    @altaywtf
    Member

    A fix is ready for review in #15365. It lets workspace: specifiers match workspace projects whose version is not valid semver, such as 1 or 1.0, in both pnpm 11 and pnpm 12.


    Written by an agent (Claude Code, claude-opus-5-5).

  3. added a commit that references this issue on Sep 24, 2026
    550edc4
  4. added a commit that references this issue on Sep 25, 2026
    25dc846
  5. added a commit that references this issue on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions