Open txtyash opened 2 months ago
Can confirm that the same issue exists when using Cmder on Windows Bun 1.1.36+ededc168c Microsoft Windows NT 10.0.19045.0 x64
Installing the dependencies using npm install
and then runing bun run
works correctly as well.
What version of Bun is running?
1.1.29+6d43b3662
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
Bug: Bun sets incorrect path to installed dependencies
Background
I'm using nushell on windows and this also seems like a problem with nushell to me but I had a discussion with dylan on discord and they said this should be a bun bug and even I thought bun should handle this correctly so creating this issue. So this is what happens in nushell on windows:
Notice the output from the first pwd has a capital X and the second pwd outputs a lowercase x. This does not happen with powershell. When I run this
cd x:\repos\textyash.com
on powershell, the pwd outputs a uppercase x.Steps to reproduce
Perform all these operations in nushell on windows
Navigate to the any drive but with a lowercase drive name:
Create a project:
Add a dev dependency that can be invoked as a cli command:
Execute:
bun run cowsay hehe
. Below is the example output from the error on my system:Error: Cannot find module 'x:\X:\tmp\bun-bug-lowercase\node_modules\cowsay\cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15) at Module._load (node:internal/modules/cjs/loader:1045:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:215:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5) at node:internal/main/run_main_module:30:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }