oven-sh / bun

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

`bun x` throws `error: unrecognised dependency format` #3675

Open james-elicx opened 1 year ago

james-elicx commented 1 year ago

What version of Bun is running?

1.0.7

What platform is your computer?

Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Run the following in your terminal window, using a custom registry's url instead of a package from npm.

bun x https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5592910039/npm-package-next-on-pages-386

What is the expected behavior?

It should install and execute the package from the provided web address.

When you run it with npx instead of bun x, everything works as expected - it will install and execute the package.

$ npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5592910039/npm-package-next-on-pages-386
⚡️ @cloudflare/next-on-pages CLI v.0.0.0-77f3b08 (prerelease for PR #386)

...

What do you see instead?

error: unrecognised dependency format: https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5592910039/npm-package-next-on-pages-386

Additional information

No response

Jarred-Sumner commented 11 months ago

This should be fixed as of Bun v1.0.3

james-elicx commented 11 months ago

This should be fixed as of Bun v1.0.3

Still happening in 1.0.4

image

Jarred-Sumner commented 11 months ago

oh you're doing bun x i see

james-elicx commented 11 months ago

Ah I didn't know there was a difference with how bun x and bunx treat it. Interestingly, bunx results in a different error.

image

btakita commented 11 months ago

I also get a loading error when running bun -b astro dev. It seems like the problem occurs when invoking a subprocess which requires a '.node' file, as running bun directly on the source file does not cause the error.

1:24:42 AM [vite] error while updating dependencies:
Error: Build failed with 2 errors:
../../node_modules/@resvg/resvg-js/js-binding.js:1:3269: ERROR: No loader is configured for ".node" files: ../../node_modules/@resvg/resvg-js-linux-x64-musl/resvgjs.linux-x64-musl.node
../../node_modules/@resvg/resvg-js/js-binding.js:1:3501: ERROR: No loader is configured for ".node" files: ../../node_modules/@resvg/resvg-js-linux-x64-gnu/resvgjs.linux-x64-gnu.node
    at failureErrorWithLog (/home/brian/work/btakita/btakita-dev/node_modules/vite/node_modules/esbuild/lib/main.js:1649:17)
    at <anonymous> (/home/brian/work/btakita/btakita-dev/node_modules/vite/node_modules/esbuild/lib/main.js:1058:17)
    at <anonymous> (/home/brian/work/btakita/btakita-dev/node_modules/vite/node_modules/esbuild/lib/main.js:1525:9)
    at processTicksAndRejections (:55:77)