I've found that if you create a dynamic route in the form of [:myparam].tsx rather than [myparam].tsx the error message is
error: Uncaught (in promise) TypeError: tokenizer error: invalid name; must be at least length 1 (at char 1)
path: new URLPattern({ pathname }),
^
at new URLPattern (ext:deno_url/01_urlpattern.js:190:24)
at UrlPatternRouter.add (https://jsr.io/@fresh/core/2.0.0-alpha.20/src/router.ts:55:15)
at App.#addRoutes (https://jsr.io/@fresh/core/2.0.0-alpha.20/src/app.ts:166:18)
at App.get (https://jsr.io/@fresh/core/2.0.0-alpha.20/src/app.ts:106:27)
at fsRoutes (https://jsr.io/@fresh/core/2.0.0-alpha.20/src/plugins/fs_routes/mod.ts:316:21)
If this is sufficient and you aren't interested in more friendly debugging output feel free to close, it isn't all that hard to figure out, but I just hit it twice in a row and figured I'd call it out.
I've found that if you create a dynamic route in the form of
[:myparam].tsx
rather than[myparam].tsx
the error message isIf this is sufficient and you aren't interested in more friendly debugging output feel free to close, it isn't all that hard to figure out, but I just hit it twice in a row and figured I'd call it out.
https://github.com/denoland/fresh/blob/b5389f69a384280319d815d6f35dd9743f0738b2/src/router.ts#L55