oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.26k stars 2.69k forks source link

"sub-dependencies" not installed correctly #10312

Closed Badbird5907 closed 2 months ago

Badbird5907 commented 5 months ago

What version of Bun is running?

1.1.3

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

The issue seems to be with the next-mdx-remote package. Packages "bundled" with it don't seem to be installed.

Repository reproducing the issue:: https://github.com/Badbird5907/bun-mdx-issue

Error:

Cannot find package 'D:\Development\random\bun-mdx-issue\node_modules\next-mdx-remote\node_modules\@mdx-js\mdx\node_modules\remark-mdx\node_modules\micromark-extension-mdxjs\node_modules\micromark-extension-mdxjs-esm\node_modules\micromark-util-events-to-acorn\node_modules\estree-util-visit\package.json' imported from D:\Development\random\bun-mdx-issue\node_modules\next-mdx-remote\node_modules\@mdx-js\mdx\node_modules\remark-mdx\node_modules\micromark-extension-mdxjs\node_modules\micromark-extension-mdxjs-esm\node_modules\micromark-util-events-to-acorn\index.js
Did you mean to import estree-util-visit/index.js?

What is the expected behavior?

The missing packages are installed

What do you see instead?

The missing packages are not installed

Additional information

Bun: image image

Yarn: image

Jarred-Sumner commented 5 months ago

Please upgrade to Bun v1.1.4 (released earlier today) and try again.

To upgrade, run bun upgrade

Badbird5907 commented 5 months ago

Please upgrade to Bun v1.1.4 (released earlier today) and try again.

To upgrade, run bun upgrade

It crashes:

bun upgrade
Bun v1.1.4 is out! You're on v1.1.3

uh-oh: attempt to unwrap error
bun will crash now 😭😭😭

----- bun meta -----
Bun v1.1.3 (2615dc74) Windows x64
UpgradeCommand:
Elapsed: 754ms | User: 0ms | Sys: 0ms
RSS: 79.22MB | Peak: 79.22MB | Commit: 0.14GB | Faults: 19539
----- bun meta -----

0   00007FF6B8DF3E18
1   ???
2   ???
3   ???
4   ???
5   ???
6   ???
7   ???
8   ???
9   ???

Search GitHub issues https://bun.sh/issues or join in #windows channel in https://bun.sh/discord

thread 55836 panic: attempt to unwrap error
???:?:?: 0x7ff6b7a17ae1 in ??? (bun.exe)
???:?:?: 0x7ff6b7a15589 in ??? (bun.exe)
???:?:?: 0x7ff6b7a18136 in ??? (bun.exe)
???:?:?: 0x7ff6b7a24e38 in ??? (bun.exe)
???:?:?: 0x7ff6b7751603 in ??? (bun.exe)
???:?:?: 0x7ff6ba2f3eb3 in ??? (bun.exe)
???:?:?: 0x7ffac3b5257c in ??? (KERNEL32.DLL)
???:?:?: 0x7ffac53aaa47 in ??? (ntdll.dll)

Same issue when running as admin. Re-installing via the powershell install script does work, however.

Still can reproduce the issue on 1.1.4 (after deleting node_modules, bun lock, and reinstalling) WindowsTerminal_PJ90aRunXg

Badbird5907 commented 2 months ago

This issue no longer occurs after updating the package versions to latest & the bun version to 1.1.18