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

bun patch not working in monorepo #12103

Closed
Scalahansolo opened this issue Jun 24, 2024 · 9 comments · Fixed by #12141
Closed

bun patch not working in monorepo #12103

Scalahansolo opened this issue Jun 24, 2024 · 9 comments · Fixed by #12141
Assignees
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client

Comments

@Scalahansolo
Copy link

What version of Bun is running?

1.1.16+bf7b327f6

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

Our monorepo contains plenty of apps / packages all defined in the root package.json workspaces array of our monorepo. After upgrading to bun 1.1.16 the following screen shot shows off the issue I am running into.

CleanShot 2024-06-23 at 21 35 07@2x

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@Scalahansolo Scalahansolo added bug Something isn't working needs triage labels Jun 24, 2024
@Jarred-Sumner Jarred-Sumner added bun install Something that relates to the npm-compatible client and removed needs triage labels Jun 24, 2024
@Scalahansolo
Copy link
Author

Opened as a response to #2336

@flokol120
Copy link

I am also experiencing problems while trying to use bun patch in a monorepo:

bun patch monaco-editor@0.36.1
bun patch v1.1.16 (bf7b327f)

Checked 4260 installs across 2976 packages (no changes) [47.00ms]
error: error overwriting folder in node_modules: FileNotFound
ls node_modules/monaco-editor 
CHANGELOG.md  dev  esm  LICENSE  min  min-maps  monaco.d.ts  package.json  README.md  ThirdPartyNotices.txt

I was using the latest canary release (1.1.17-canary).

@adamdottv
Copy link

I am also experiencing problems while trying to use bun patch in a monorepo:

bun patch monaco-editor@0.36.1
bun patch v1.1.16 (bf7b327f)

Checked 4260 installs across 2976 packages (no changes) [47.00ms]
error: error overwriting folder in node_modules: FileNotFound
ls node_modules/monaco-editor 
CHANGELOG.md  dev  esm  LICENSE  min  min-maps  monaco.d.ts  package.json  README.md  ThirdPartyNotices.txt

I was using the latest canary release (1.1.17-canary).

fwiw, i still have this issue on bun 1.1.18, even with #12141

@Neiso
Copy link

Neiso commented Jul 9, 2024

Same here. Is there anything I could provide to help debug this or should I open a new issue?

$ bun -v
1.1.18
$ bun patch react-native-dropdown-picker
[1.05ms] ".env"
bun patch v1.1.18 (5a0b9352)

Checked 1488 installs across 1241 packages (no changes) [324.00ms]
error: error overwriting folder in node_modules: FileNotFound

@Jarred-Sumner
Copy link
Collaborator

@Neiso @adamdottv are you still running into this in the canary build of Bun?

bun upgrade --canary

@adamdottv
Copy link

@Neiso @adamdottv are you still running into this in the canary build of Bun?

bun upgrade --canary

works for me now, thanks @Jarred-Sumner!

@hassankhan
Copy link

@Jarred-Sumner This issue persists for me in an nx monorepo with a top-level node_modules/ on both Bun v1.1.18 and v1.1.19-canary.1 (a36a01e)

@Jarred-Sumner
Copy link
Collaborator

@hassankhan can you open a new issue with a reproduction? It’s likely a different bug

@hassankhan
Copy link

@Jarred-Sumner While I was trying to create a repro, I found that opening a new terminal session and running bun patch in the project seems to work.

In my case, I'd upgraded bun from 1.1.14 to 1.1.18 and then 1.1.19-canary.1 in the same session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants