Skip to content
Discussion options

You must be logged in to vote

@adriandlam BINGO🎉🎉 it worked!

Our Express + Nitro + Vercel deployment is now live and functioning correctly. The "Executing Node.js middleware in an edge runtime" error is gone.

For anyone else hitting this issue, here's the working config:

// nitro.config.ts
export default defineNitroConfig({
  preset: 'vercel',
  routes: {
    '/**': {
      handler: './src/index.ts',
      format: 'node',
    },
  },
  vercel: {
    entryFormat: 'node',
  },
  // ... rest of config
})

And in src/index.ts, export the Express app directly:

export default app;

Thanks so much for the quick fix! This unblocks our Workflow DevKit integration which relies on the Express app structure.

Replies: 2 comments 17 replies

Comment options

You must be logged in to vote
13 replies
@eersnington
Comment options

@waldhari1
Comment options

@adriandlam
Comment options

@waldhari1
Comment options

Answer selected by pranaygp
Comment options

You must be logged in to vote
4 replies
@adriandlam
Comment options

@eersnington
Comment options

@waldhari1
Comment options

@waldhari1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants