Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

🐛 BUG: Module './Icon.astro' was resolved to '<path_to_component>/Icon.astro', but '--jsx' is not set. #787

@slimluccii

Description

@slimluccii

Describe the Bug

I'm exporting the Icon.astro component in an index.ts file like export { default } from './Icon.astro';. This causes a red line under the file path ./Icon.astro. When I hover over there line I get the following error Module './Icon.astro' was resolved to '<path_to_component>/Icon.astro', but '--jsx' is not set. ts(6142).

Steps to Reproduce

  1. npm create astro@latest using template Empty with Typescript
  2. Create the Icon.astro component.
  3. Create an index.ts.
  4. Export the Icon.astro from the index.ts like export { default } from './Icon.astro';
  5. Error! When you have the Astro extension running you should see the red line under the path ./Icon.astro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: has workaroundBug, but has workaround (priority)pkg: ts-pluginFixes to the TS plugin are required to fix this issue (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions