Skip to content
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 for nohoist / multiple versions of the same package #6850

Open
michelalbers opened this issue Nov 2, 2023 · 6 comments
Open

Support for nohoist / multiple versions of the same package #6850

michelalbers opened this issue Nov 2, 2023 · 6 comments
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request

Comments

@michelalbers
Copy link

What is the problem this feature would solve?

I have a monorepo with multiple frontends and multiple backend services. Some frontends are at the latest version of React and some are still using an older version. Same goes for the backends - some need older versions of express and some are using the most recent one.

With bun it seems that all dependencies are hoisted to the root and there can only be one version per package available. I would need to circumvent that problem with a nohoist option.

What is the feature you are proposing to solve the problem?

Introduce nohoist to give developers more control over specific hoisting needs.

What alternatives have you considered?

Using pnpm which stores the packages with a version tag so there are no clashes. But obviously I want to try bun :)

@michelalbers michelalbers added the enhancement New feature or request label Nov 2, 2023
@Electroid Electroid added the bun install Something that relates to the npm-compatible client label Nov 4, 2023
@frankcalise
Copy link

Also experiencing a need for this for a react-native project inside of a monorepo

@keverw
Copy link

keverw commented Dec 13, 2023

I'm playing around with Ionic Framework and Capacitor. Looks like it complains if not in there directly even though they have multi-app support. For now my workaround is just to symlink it.

@coolcorexix
Copy link

coolcorexix commented Sep 16, 2024

desperately need this support too :( please let me know what I can help to speed up the development of this feature

@Scalahansolo
Copy link

To add to the list here, this is preventing Motion from using bun as our package manager in production.

@lkuoch
Copy link

lkuoch commented Dec 30, 2024

@Jarred-Sumner any update for this?

@JRhodes95
Copy link

JRhodes95 commented Jan 10, 2025

Likewise - our use-case is a design system that uses tailwind and asks consumers to scan the library's node_modules entry for class usage - similar to what Flowbite does.

Hoisting by default makes this marginally harder in monorepos as the relative path changes based on where it's hoisted to.

EDIT - it is also breaking font sourcing with vite where the font file is provided by the design system package and referenced in css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants