deno icon indicating copy to clipboard operation
deno copied to clipboard

Uncaught SyntaxError: The requested module './Reflect.ts' does not provide an export named 'Reflect'

Open slim-hmidi opened this issue 1 year ago • 2 comments

I use deno v1.23.4 and inject module. While I run the server I got this error:

error: Uncaught SyntaxError: The requested module './Reflect.ts' does not provide an export named 'Reflect'
export { Reflect } from "./Reflect.ts";

It seems like deno accepts only declare namescpace and export type. https://deno.land/manual/typescript/faqs#why-are-you-forcing-me-to-use-isolated-modules-why-cant-i-use-const-enums-with-deno-why-do-i-need-to-do-export-type

Reproduction:

import { Reflect } from "https://deno.land/x/[email protected]/mod.ts";
console.log(Reflect);

slim-hmidi avatar Jul 13 '22 18:07 slim-hmidi

This is an swc-only bug, opened https://github.com/swc-project/swc/issues/5197.

nayeemrmn avatar Jul 13 '22 19:07 nayeemrmn

I encountered this problem after upgrading the Deno version, so I modified the original code myself. You can use this package first: https://deno.land/x/[email protected]

jiawei397 avatar Jul 31 '22 04:07 jiawei397

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '22 19:09 stale[bot]

Any fix to this - ?

divyavanmahajan avatar Nov 17 '22 20:11 divyavanmahajan