bun.cmd id not recognized
HighError opened this issue · 8 comments
- I have searched for similar issues
- I am using the latest version of
npm-check-updates
- I am using
node >= 14.14
Steps to Reproduce
Steps:
- Run npm-check-updates
- Accept to install updates via bun on Windows
Current Behavior
√ Run bun install to install new versions? ... yes
Installing dependencies...
'bun.cmd' is not recognized as an internal or external command,
operable program or batch file.
Error: spawn bun.cmd ENOENT
at C:\Users\Admin\.bun\install\global\node_modules\npm-check-updates\build\src\index.js:178:23
Expected Behavior
Command run without error
I think the problem is that bun.cmd
is used, although Windows uses the bun
(bun i
) command for bun by default.
And since bun.cmd
is not a registered command, an error occurs
Hi, thanks for reporting. It looks like Windows support was added to Bun recently, so we can try to turn on Bun support in npm-check-updates.
I changed it to use bun
instead of bun.cmd
and published to v16.14.20-0
. Can you try npx npm-check-updates@16.14.20-0 -u
and let me know if that works?
P.S. Out of curiosity, what do you get when you run node -p process.platform
? I would have expected the latest npm-check-updates to exit with the error "Bun not yet supported on Windows". It checks process.platform
to determine the OS. But yours seems to bypass that check somehow.
Working good
I run commandbunx npm-check-updates -i
(with npx too)
Great, I'll get that merged and published to latest
then.
node -p process.platform -
win32
Huh. I can't explain why you were able to make it to the install step, but I guess it's not a problem now!
Published to v16.14.20
.
Yeah, that could explain it.