Express 5.x Compatibility Issue with Wasp-Generated Code
Backend✅SolvedTypescript
Wasp Version: 0.20.1 Express Version: 5.1.0 TypeScript Error Location: .wasp/out/sdk/wasp/server/utils.ts:28-33
Problem
After upgrading to Express 5.x (express": "~5.1.0" and @types/express": "^5.0.0"), I'm getting a TypeScript compilation error in Wasp's generated server utilities when running
wasp start
wasp start
:
Property 'end' does not exist on type 'void'.
Property 'end' does not exist on type 'void'.
Root Cause
The issue is in the generated redirect() helper function:
// File: .wasp/out/sdk/wasp/server/utils.ts export function redirect(res: Response, redirectUri: string) { return res .status(302) .setHeader("Location", redirectUri) .end(); }
// File: .wasp/out/sdk/wasp/server/utils.ts export function redirect(res: Response, redirectUri: string) { return res .status(302) .setHeader("Location", redirectUri) .end(); }
Questions 1. Is Wasp 0.20.1 officially compatible with Express 5.x? 2. Recommended approach? Should I: - Stay on Express 4.x for now - Wait for an official Wasp update
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.