-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Module resolution doesn't work correctly when the module specifier includes double slashes //
#25532
Comments
It looks like Source: import type { Context } from '../../context'
import { TEXT_PLAIN } from '../../context'
import type { StreamingApi } from '../../utils/stream'
import { stream } from './'
// ... Compiled: import { TEXT_PLAIN } from "../../context.js";
import { stream } from ".//index.js";
// ... |
Thanks for the report.
I confirmed this specifier A more minimal reproduction is: a.js import "./b//c.js"; b/c.js import "../d.js"; d.js console.log("hi"); When executing
(Deno seems considering While Node executes the above without problem. |
This looks fixed in Hono's side (honojs/hono#3405 ) @janispritzkau Can you try again with the latest version of Hono? import "npm:[email protected]/streaming"; |
It's great that the hono team simplified the import, but we should be able to deal with |
@kt3k Yes, that works. Thank you. I also think this should be fixed on Deno's end. It seems like extra slashes being ignored in path resolution is a common behavior. |
npm:hono/streaming
//
I agree that this should also be fixed on Deno's side. I updated the title to clarify the problem. |
Version: Deno 1.46.3
Deno REPL:
I'm not quite sure how this happens. I notice that there are two slashes in the "imported from" module.
The text was updated successfully, but these errors were encountered: