Open Arctomachine opened 6 months ago
There seem to be more to this problem. It puts all dependencies from all workspaces into root. And the only exception happens to be when workspace name matches dependency name.
Alternatively, if it is intended behavior, the bug is when scripts and libraries are unable to find required dependencies in root.
I understand now what exactly happens here. Original description is only half correct. Main issue here is that bun confuses folder in our project with dependency used in there - if their names match. It thinks project folder is dependency installed locally, so it simply links dependency to this project folder.
On example from first post: next (folder)
has dependency next (package)
. So when it encounters next (package)
in package.json, it creates link to next (folder)
. And as expected, everything breaks because contents of next (folder)
is not what should be inside next (package)
What version of Bun is running?
1.1.3
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
Works for just install command and for running create-something installer packages. Using create-next-app as example here
bun init
, accept defaults"workspaces": ["apps/*"]
and create ./apps folder in projectbunx --bun create-next-app@latest next
, accept defaults, wait for process to finishWhat is the expected behavior?
All dependencies for
next
(folder in our project) are under ./apps/next/node_modulesWhat do you see instead?
The only dependency in this folder is
next
All other dependencies are in project root under ./node_modulesAdditional information
No response