question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lerna does not support yarn 2 workspace:* url type

See original GitHub issue

Lerna does not seem to support the new workspace:* version schema used in yarn2. This seems really strange to me given that the yarn documentation mentions Lerna immediately after the section in the documentation on workspace:* so I may be missing something here.

Expected Behavior

I would expect Lerna to understand this dependency format and resolve to the local workspace copy of the package.

Current Behavior

Lerna: ERR! Error: unsupported url type “workspace:”: “workspace:*”

Steps to Reproduce (for bugs)

Create a simple repo using yarn 2 with packages a and b

Run

yarn workspace a add b@workspace:*

Run lerna version

Your Environment

Executable Version
lerna --version 3.20.2
yarn --version 2.0.0-rc.33
node --version 12.16.1
OS Version
NAME VERSION
Windows 10 17763

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:44
  • Comments:16

github_iconTop GitHub Comments

20reactions
zsluckycommented, Sep 28, 2020

Waiting for this feature too 👍

7reactions
osteelecommented, Feb 11, 2022

Until this issue is resolved, would it make sense to remove this text from https://yarnpkg.com/features/workspaces#yarn-workspaces-vs-lerna? It is so far as I can tell factually incorrect.

If there is some sense in which it is correct, maybe there is some improvement to the wording that doesn’t have the same risk of misleading users into thinking some things will work that don’t.

Despite the appearances, the Yarn workspaces and Lerna don’t compete. In fact, Lerna will use Yarn’s workspaces if possible. In a sense, you can see Lerna as a high-level layer on top of the low-level Yarn implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Lerna and Yarn Workspaces is a Perfect Match for ...
With this setup, lerna completely dedicates the dependency and bootstrapping workflow to yarn workspaces.
Read more >
Lerna does not support yarn 2 workspace:* url type -
Lerna does not seem to support the new workspace:* version schema used in yarn2. This seems really strange to me given that the...
Read more >
Workspaces - Yarn
Yarn's workspaces are the low-level primitives that tools like Lerna can (and do!) use. They will never try to support the high-level feature...
Read more >
Migrating our Monorepo to Yarn 2 | DoltHub Blog
At first, it was a dependency that was breaking our website build. ... Yarn 2 no longer supported this argument, so we used...
Read more >
A guide through The Wild Wild West of setting up a mono repo ...
We will be using TypeScript, Yarn workspaces, Lerna, and Jest. ... These kinds of issues call for support of multi-package repositories directly in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found