-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support unpublished lerna
packages – ignore symlinked packages or not found failures
#2863
Comments
Possible this should be an rfc and/or is perhaps superseded by yarnpkg/rfcs#34 |
lerna
packages – allow ignoring failures due to package not in registrylerna
packages – ignore symlinked packages or not found failures
@timoxley did you find a solution for this? I agree this issue will be covered by the workspaces project (#3294), but that seems like a longterm project; a small fix here could be a really big win.
I don't think you'd need a config file change -- it seems yarn could easily respect the already present symlnks? |
Yarn workspaces are available for this use case |
Hi @bestander. Every month or so I try to check in to see if #3294 has come out of RFC phase. I can't find anything here: https://yarnpkg.com/en/docs. I can't find anything on Google either except for others eagerly awaiting it: https://medium.com/spektrakel-blog/yarn-workspaces-are-coming-477c3707f482? Are there any docs?
Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command. Returns 404 No mention here either: https://yarnpkg.com/en/docs/cli/ |
Hey, @richburdon. Workspaces are out of RFC and the available in 0.28 release, still tentatively calling it "experimental" to allow for breaking changes when the solution is refined. |
Thanks @bestander; really looking forward to this. I looked here (jestjs/jest#3906) but don't see any docs on usage or the config. Is there a sample project? If not, do you have a timeframe in mind for your blog post. Thanks again for the work. |
I've tried turning this on in an test app and even with workspaces enabled yarn still complains when trying to call Don't get me wrong, the auto hoisting being done by yarn now is nice, but Lerna did that for me too. The biggest problem we've always had is that when using yarn you can't install package dependencies inside sub packages without yarn complaining about unpublished packages. This forces you to either use Am I missing some config I can set to get yarn to ignore workspace packages? |
|
@bestander It seems there's already an issue for it #3973 |
What is the current behavior?
Currently, if a dependency is not found in the registry,
yarn
will error:This is a problem if you're using
lerna
to manage internal packages, since running anyyarn
commands inside apackages/*
dependency will fail. This means you currently cannot add/remove dependencies to apackage.json
/yarn.lock
file usingyarn
directly if the package depends on an unpublished local dependency. The only way to get any dependencies to install at all for such packages is to uselerna bootstrap
.steps to reproduce:
What is the expected behavior?
Ideally,
yarn
would simply ignore any existing symlinked packages, or could be told to do so.Or there would be a way to tell yarn to ignore particular packages:
Ideally this could be set from either the commandline or as a persistent package-wide config via
package.json
or a.yarn
file:Very open to other ideas or workarounds.
Issue originally reported on
lerna
repo, but I now feel this is more of ayarn
concern: lerna/lerna#501The text was updated successfully, but these errors were encountered: