You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's wait for the users to request interop with bun.
I'm a user, and I am requesting interop with bun! 🙋😄
I've just switched my largest project to bun (now that bun 1.0 has been released), and everything works perfectly except running tests in Playwright.
A lot of packages run in bun without issue, but both bun and Playwright have difficult jobs, so it's not surprising that there would be challenges. Like npx playwright, Bun supports TypeScript and running tests directly — so I think it's fair to say that a developer who likes the ergonomics of either would be a good candidate for interest in the other.
oven-sh/bun#2492 documents many folks trying to use Playwright from bun, although I don't understand the situation well enough to help fix it. But if there is anything Playwright can do to help be more compatible in bun, I'd be glad to be able to use that as soon as possible.
Reacted by arthur-encord, Matthieu Brouillard, GG Nam, Bálint Fülöp, Max Milton, Felix, Rodion Vynnychenko, Luiz Gonzaga dos Santos Filho, Moishi Netzer, Oleg Lustenko and 63 more
As of today Bun is not Node.js compatible, a lot of things are still missing or behaving different. This is not something we can act on/can improve.
Once they are Node.js compatible and have the missing Node.js APIs implemented, we might reconsider putting a bun section into our docs.
Reacted by Lucas Garron, GG Nam, Okku, Mateusz Walendzik, 卫斯理, Dmytro Tiapukhin and nakorn-ball-qb
Reacted by Vianney Carel, Morten rasmussen, Haroon Bakhsh, eram, Bartosz Sławianowski, Gabriel, Valtrizt Khalifah Warri, Eric Karnis, Tomáš Hübelbauer, Kazantcev Andrey and 6 more
Reacted by Olaf Tietze, Withaspoon, Stanislav Grishaev, Luke Ramsden, sowdowdow, Moishi Netzer, Sean Knowles, Christian Pekeler, German Jablonski, Rachasak Ragkamnerd and 18 more
As of today Bun is not Node.js compatible, a lot of things are still missing or behaving different. This is not something we can act on/can improve.
Once they are Node.js compatible and have the missing Node.js APIs implemented, we might reconsider putting a bun section into our docs.
Do you have a list of APIs that are missing for Playwright?
There appears to be quite a bit of logic that checks Node version. That's probably a show stopper to start. Not only will it not work with bun, it doesn't appear that it will work with Deno or alternative runtimes.
Joshua Dickerson (@joshua-bn) You can use bun with the playwright. It is already described in my blog post here. Despite "hello world" run I have a few tests on my current project and Buns does not give a big performance for playwright tests, since the playwright bottleneck performance - is sending commands in your browser via Chrome remote CDP API, which executes your code.
Reacted by Joshua Dickerson, GG Nam and Julian Carrier
Reacted by Ryan, Jarred Sumner, Ambrose Piambo, cwegener, spiffytech, Miika Kokkonen, Lucas Bonafé, Tomáš Hübelbauer, Aqil Contractor and Alex Irvine
@joshua-bn You can use bun with the playwright. It is already described in my blog post here. Despite "hello world" run I have a few tests on my current project and Buns does not give a big performance for playwright tests, since the playwright bottleneck performance - is sending commands in your browser via Chrome remote CDP API, which executes your code.
For anyone also looking into this, currently when you try and run test with playwright bun will use node, if you even try to use --bun to force playwright to use buns runtime this wouldnt work.
Reacted by charlie, Vianney Carel, Herc, Javi Cardenas, Jan Poth, Tomáš Hübelbauer and Aqil Contractor
For anyone also looking into this, currently when you try and run test with playwright bun will use node, if you even try to use --bun to force playwright to use buns runtime this wouldnt work.
Activity
mxschmitt commentedon Sep 18, 2023
As of today Bun is not Node.js compatible, a lot of things are still missing or behaving different. This is not something we can act on/can improve.
Once they are Node.js compatible and have the missing Node.js APIs implemented, we might reconsider putting a
bunsection into our docs.joshua-bn commentedon Sep 24, 2023
Do you have a list of APIs that are missing for Playwright?
There appears to be quite a bit of logic that checks Node version. That's probably a show stopper to start. Not only will it not work with bun, it doesn't appear that it will work with Deno or alternative runtimes.
vitalics commentedon Sep 25, 2023
Joshua Dickerson (@joshua-bn) You can use bun with the playwright. It is already described in my blog post here. Despite "hello world" run I have a few tests on my current project and Buns does not give a big performance for playwright tests, since the playwright bottleneck performance - is sending commands in your browser via Chrome remote CDP API, which executes your code.
ngocphamm commentedon Sep 25, 2023
Vitali Haradkou (@vitalics) What command did you use to run the tests "with" bun?
From my understanding
bunx playwright testwill still use NodeJS to run the tests, accodring to this line when I typebunxalone in the command line.The --bun flag forces the package to run in Bun's JavaScript runtime, even when it tries to use Node.js.I think we will only get the issue when we run
bunx --bun playwright test.milosworks commentedon Jun 7, 2025
For anyone also looking into this, currently when you try and run test with playwright bun will use node, if you even try to use --bun to force playwright to use buns runtime this wouldnt work.
javi-cardenas-ke commentedon Aug 21, 2025
From the maintainers of bun:
If a package works in Node.js but doesn't work in Bun, we consider it a bug in Bun. Please open an issue and we'll fix it.
https://bun.sh/docs/runtime/nodejs-apis
Skip ESM module registratin in `bun`.
Skip ESM loader registration in `bun` (to avoid a hang).
Skip ESM loader registration in `bun` (to avoid a hang).
MBanucu commentedon Jan 24, 2026
#27139 (comment)
playwright version 1.58 seems to work with bun 1.3.6. See also https://github.com/MBanucu/bun-playwright-nix
Adopt Bun for install + script running (selective migration)
chore(sm-qyeg): link upstream Playwright/Bun tracking issue in bunfig…
mirao commentedon Sep 17, 2026
Found this note: https://bun.com/blog/bun-v1.4#playwright
BTW I'm running CodeceptJS 4.1 + Playwright 1.62.1, with Bun 1.4.2. Everything works well.