New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: lerna remove #1886
Comments
👍 |
1 similar comment
👍 |
What does the One can also run |
The following workaround worked for me:
$ lerna bootstrap --scope @org-name/package-name --no-ci --force-local |
If you're using yarn workspaces with Lerna (generally a good idea, avoids dependency duplication related problems), you can do something equivalent to
...but it'd be simpler still to just be able to use lerna alone and mirror |
please add
|
What's the status of this feature? This issue is already over a year old. |
@evocateur is this something you plan to add? If not, maybe some documentation could be added as to the preferred method of removing packages? |
I am very surprised to find that there is an add but not a remove... |
Typed |
@mesqueeb last commit was 19 days ago. It seems to be still maintained. |
i need it, too. |
Seems like a reasonable feature request +1 |
Apologies if this is already mentioned in another issue. I'm putting this out there for the next person running into the same issue I just did. I noticed This will cause I created a repo to reproduce the issue: https://github.com/lfre/lerna-add-remove-issue. TLDR: The solution is to manually delete the lock file e.g: Even though the issue is with |
Hey folks, is there any way someone not lerna-savvy can help doing a PR for this one? |
@thiagodelgado111 There is one and it's already closed by maintainer: #1887 |
I think this can be closed as "won't fix" |
If |
Is a joke, right? 👏 |
The problem is that you can't just use npm if you have dependencies between your own packages. |
Any update on this? |
Any progress? |
we need this |
help us lerna! WE NEED |
I need this, too! |
|
我们需要 |
There ain't gonna be any remove command. Move on. |
It seems
|
@mrdulin It does not. |
29 changed files and thousands of lines of code just to add this command seems a bit crazy. I can see why it wasn't added although it's obviously essential (no sensible tool has an "add" command without a matching "remove" one), and the 257 upvotes on this issue speak for themselves. Anyway Lerna is pretty much discontinued now so it's unfortunately time to migrate to other tools. |
Still waiting for this feature!!! |
Honestly I don’t see the big deal. Just run
|
At that point, why not use this to add something as well? At least there are a couple of workarounds but I would think as a common practice, where there is an add, there is a remove. Where there is a create, there needs to be an update, and delete. It's just common practice. I've been using lerna now for a week and this is one of the first issues I've ran into and of course I come here to find solutions. It is a bit alarming to see issues like this open for so long and desired by so many people. |
I need the feature |
Hi Folks 👋 Lerna is the original monorepo/workspace tool in the JavaScript ecosystem. When it was created in 2015/2016 the ecosystem looked totally different, and there were no built in capabilities to handle working with multiple packages in a single repository (a "workspace"). Commands like However, now that we find ourselves in late 2022, the fact is that - for many years now - the package managers we know and love (npm, yarn and pnpm) all fully support that concept of workspaces as a first-class use-case. They have battle tested implementations covering adding, removing and linking local packages, and combining them with third party dependencies in a natural way. This is the reason why, for the past several years of his tenure as lead maintainer of Lerna @evocateur has been encouraging folks to strongly reconsider their use of the legacy package management commands in lerna, and instead leverage their package manager of choice to do what it does best. We knew about this context from afar, but as new stewards of the project we did not want to jump straight in and start removing capabilities without first taking the time to get familiar with the reality up close. Now that we have been actively maintaining the project for half a year, we are in full agreement with Daniel and others that the legacy package management commands in lerna need to be retired. By removing these legacy pieces which have better alternatives natively in package managers, we and the rest of the lerna community will be freed up to concentrate our efforts on things which are uniquely valuable about lerna (such as, but not limited to, versioning and publishing), and making them the best they can be! From version 7, therefore, we will no longer ship the legacy package management commands (such as lerna bootstrap, lerna add and lerna link) by default with lerna, and instead make them available as an add-on via a separate package (name TBD). This new package can be thought of as being in maintenance mode only - no new features will be considered for legacy package management concerns (such as lerna bootstrap, lerna add and lerna link), and we will only look to merge critical patches and security updates. We of course want to make sure that folks who are perhaps less aware of the modern capabilities of their package manager are not left confused by this change, so we will be building out comprehensive migration guides on https://lerna.js.org/ to help them transition their thinking from a legacy lerna command to its equivalent for npm, yarn or pnpm. If you have any specific concerns please kindly join in on the Lerna v7 Roadmap discussion and provide as much context as possible: #3410 Many thanks 🙏 |
Removes dependency from packages, the inverse of @lerna/add
Currently there's no way to remove a dependency from a lerna package,
the closest way we can do is to manually remove from
package.json
,lerna clean --yes --scope=xxx
+lerna bootstrap --scope=xxx
.This command provides the remove dependency feature. Just like
npm uninstall
oryarn remove
.The text was updated successfully, but these errors were encountered: