-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
C:\...\node_modules\path-to-regexp\dist\index.js:73
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
^
TypeError: Missing parameter name at 10: https://git.new/pathToRegexpErrorScreenshot
When using a wildcard route like app.get("/modules/", ...) in Express, I occasionally encounter an error. The error occurs even though the route syntax seems valid. Using a named parameter with a wildcard (:path()) also sometimes fails depending on route ordering with express.static.
Environment data
PS Version: 5.1.19041.6456
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 225
BufferHeight: 47Steps to reproduce
node .\server.js
Expected behavior
Express should serve the requested file or 404 if missing.
Actual behavior
path-to-regexp throws a TypeError: Missing parameter name instead of serving the file.
Wildcard route fails even with :path(*) in some cases.
Metadata
Metadata
Assignees
Labels
No labels