Issues with dev auto reload on changes with playwright

I have set up a function in Redwood that opens a Playwright Chromium browser. However, it seems like after changes in the code the API server fails to reload in dev environment.


import { chromium } from 'playwright'

export const handler = async () => {
  const browser = await chromium.launch({ headless: true })
  await browser.close()

  return { body: 'Saaan' }


  1. Load the function http://localhost:8911/foo
  2. Edit a file in the project. It can be any file, for example, foo.ts
  3. Load the function again http://localhost:8911/foo
  4. The api log now shows “Error: listen EADDRINUSE: address already in use :::8911” and the changes haven’t been applied.

Is there something I’m missing here? I have double-checked so the headless browser is closed and I’m using the latest version of Redwood and Playwright. Would appreciate some assistance before filing a ticket in case I’m missing something.