[Feature Request] Update SSR template to Express 5 #18209
Unanswered
selaimanh
asked this question in
CLI - SSR mode
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Title: [Feature Request] Update SSR Scaffold to Express 5.0
Description
Since Express 5.0.0 was officially released as stable (October 2024), it is now the current industry standard. However, the current Quasar SSR starter template (via
@quasar/app-vite/@quasar/app-webpack) still scaffolds projects using Express 4.Currently, new users starting a Quasar SSR project are encountering a breaking change error:
error: Missing parameter name at index 1: *; visit https://git.new/pathToRegexpError for infoWhy upgrade to Express 5?
try/catchor helper packages likeexpress-async-errors.path-to-regexpis more strict and robust, which is better for long-term project maintenance.Proposed Changes
package.jsonto use"express": "^5.0.0".src-ssr/server.js(and.ts) to fix the "catch-all" route syntax:app.get(resolve.urlPath('*'), (req, res) => { ... })app.get(resolve.urlPath(/(.*)/), (req, res) => { ... })@types/expressis updated to the corresponding version to avoid TypeScript mismatches withRegExppaths.Additional Context
I recently ran into the
PathErroron a fresh install. This can be quite confusing for newcomers who expect the "Out of the box" experience to work with the latest Node.js ecosystem packages.Submitted by a Quasar user seeking to keep the SSR mode modern and bug-free.
Beta Was this translation helpful? Give feedback.
All reactions