oven-sh / bun

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

Bun is unable to build an application that uses a library like `puppeteer-extra` #5012

Open Wazbat opened 1 year ago

Wazbat commented 1 year ago

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983

What platform is your computer?

Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Create a simple bun application Add the package

bun add puppeteer-extra

Create an src/index.ts file

import puppeteer from 'puppeteer-extra';
console.log(typeof puppeteer);

Try to build the file server

bun build --target=bun ./src/index.ts --outfile=dist/server.js

What is the expected behavior?

I expect a server.js file to be generated

What do you see instead?

error: cannot write multiple output files without an output directory

Additional information

The file runs fine if ran directly via bun, it only fails when building a server.js file The command works fine with other packages

aralroca commented 1 month ago

I have the same problem with monaco-editor...

import { editor } from 'monaco-editor';