Skip to content

Error running vercel dev locally: No fetch handler exported from file:///.../packagephobia/src/server.ts #1104

Description

@JoshuaKGoldberg

After running npm i and following the instructions in CONTRIBUTING.md, including getting redis running with Docker:

$ vercel dev
Vercel CLI 56.5.0 (Node.js 24.3.0)
> Ready! Available at http://localhost:3000
NODE_ENV: development
isProd:  false
TMPDIR:  /var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/
HOME:  /var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/
◆ Server handler: No fetch handler exported from file:///Users/josh/repos/packagephobia/src/server.ts
◇ Static files:   ./public/

➜ Listening on: http://127.0.0.1:51327/
[8:49:02 AM] GET http://127.0.0.1:51327/ [501] (2.25ms)

Visiting http://localhost:3000 indeed shows:

Server Error / No Fetch Handler Exported

I tried this with a few versions using npx -y vercel@... dev:

  • 54, 55: same Server handler: No fetch handler exported
  • 50, 53: LambdaError: Unable to import module 'src/server'

🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions