Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception when deploying modules with special characters in paths #352

Open
yuhr opened this issue Dec 27, 2024 · 0 comments
Open

Comments

@yuhr
Copy link

yuhr commented Dec 27, 2024

See the logs of this job:

TypeError: module not found: 'file:///src/examples/api/*%253F.route.ts'

I'm deploying a module named examples/api/*%3F.route.ts that should be imported from the entrypoint. The build step generates the entrypoint with the content being like this:

import Router from "./../src/Router.ts"
const routetslist = [
	["/api/*%3F", (await import("./api/*%253F.route.ts")).default],
	["/", (await import("./.route.ts")).default],
	["/void", (await import("./void.route.ts")).default],
	["/undefined", (await import("./undefined.route.ts")).default],
	["/throw", (await import("./throw.route.ts")).default],
	["/react", (await import("./react.route.tsx")).default],
	["/null", (await import("./null.route.ts")).default],
	["/hello", (await import("./hello.route.ts")).default],
	["/api/hello", (await import("./api/hello.route.ts")).default],
	["/api/*?", (await import("./api/*%3F.route.ts")).default],
	["/:dynamic", (await import("./%3Adynamic.route.ts")).default],
	["/*", (await import("./*.route.ts")).default]
] as const
await Deno.serve(new Router(routetslist)).finished

Deno itself successfully run this entrypoint on my machine. If I remove examples/api/*%3F.route.ts and examples/api/*?.route.ts from the codebase and retry deployment, it completes successfully. Seems like deployctl doesn't handle special characters in module file paths correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant