-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
lerna bootstrap
tries to build dependency in the wrong order, so dependent build fails
#2453
Comments
I updated the issue with a reproduction. |
The cause of this was that I was using EDIT: Warning: Switching from |
EDIT: This issue is still valid. |
This is still a problem, because with NPM, But this conflicts with the requirement of needing to use |
To add to this, due to yarnpkg/yarn#5047, |
So, is there a workaround for this issue? |
I'm also doing the above - is there a better way to handle this? |
Also running into this - if using the dependency tree to determine the package build order would be too much work, respecting the order of the |
This is what I've been using successfully for the last years to run |
I solved the issue by adding a |
Hi Folks 👋 Please take a look at our published roadmap for Lerna v7 here: #3410 One of the key items covered at length on there (please do read it for full context) is that now that we find ourselves in late 2022, it no longer makes sense for lerna to supplement package management concerns (such as installation, boostrapping, linking etc) which are covered reliably for monorepo workspaces by the three main package managers: npm, yarn and pnpm. If you have any specific concerns please do join in on that discussion, and provide as much context as possible. Many thanks 🙏 |
It appears that lerna links a local project A into a local project B, but does not run the
build
step of project A before it tries to build project B, so project B's build fails because it can not resolve the modules from project A because it does not have its dist folder.Expected Behavior
Lerna should build A before B.
Current Behavior
Lerna doesn't, and so B's build fails.
Possible Solution
Steps to Reproduce (for bugs)
git clone --recursive git@github.com:infamous/umbrella.git cd umbrella git checkout lerna-issue-2453 lerna bootstrap
lerna.json
lerna-debug.log
None.
Context
I was trying out lerna for the first time in an existing repo that has multiple projects. Each project is a git submodule.
Could the fact that the projects I have in
apps/*
andpackages/*
are git submodules be throwing of Lerna's build algo?Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: