-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Yarn 2: support focusing on a workspace for monorepo #919
Comments
This ☝️ Is there no way to do this with Heroku currently? I came across this thread in search of a way to override the |
Probably wouldn't be hard to implement though, with an environment variable. Maybe |
We've fixed this in our fork like this. Two reasons I don't open an upstream PR (yet):
With clear answers to those two a PR might be closer to reality! |
One more thing to note here: This feature is doubly important if you want to slugignore other parts of a monorepo (which I do). In this case yarn will fail because once part of the workspaces tree is ignored the lock file would be modified. Maybe this answer 1) from the comment above. I think the expected behavior of |
Any updates here, I've stumbled upon this problem this week. I believe this also partially solves the problem described in #906 My initial though to solve this was to skip pruning and execute focus on post-build script |
Yea, I skipped pruning (don't have focus in post-build). My slug is a lot larger now, but it works. |
@tevonsb how did you manage to skip pruning using yarn 2: did you use the custom buildpack by mentimeter devs mentioned above or a config using this buildpack by heroku? |
It was my slug-ignore that was causing the issues! It was removing a sub-repo which contained dependencies, so yarn was getting confused and trying to reinstall them when it ran. |
Thanks for the fork @ostenbom, works a treat. 😁 I was able to achieve a specific workspace install and build using a fork of https://github.com/mentimeter/heroku-buildpack-nodejs - I just updated from upstream: https://github.com/loggedltd/heroku-buildpack-nodejs And a new buildpack I've whipped up to add the node version, build and start scripts to the root Would love to combine the 2, but don't have the time at the mo. Note: |
Is your enhancement request related to a problem? Please describe.
My project uses
yarn workspaces
with a monorepo, and we use Heroku to deploy our API. But just runningyarn install
means that it ends up installing all the dependencies of our monorepo, which wastes time especially for tools that require building during the link step.Describe the solution you'd like
I'd like a way to configure to install using
yarn workspaces focus $MY_PACKAGE_NAME
to skip installing deps for all the other packages, as they're irrelevant for my Heroku app deployThe text was updated successfully, but these errors were encountered: