Skip to content

[bug] JSX support in preserve mode w/ custom jsxImportSource causing TS2875 #765

@tmm1

Description

@tmm1

I have a tsconfig.json approximately like:

"compilerOptions": {
        "module": "es2022",
        "jsx": "preserve",
        "jsxImportSource": "external/solid",
        "baseUrl": ".",
        "paths": {
                "external/*": ["./external/*"]
        },
        "target": "es2022",
error TS2875: This JSX tag requires the module path 'external/solid/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed.

even though this file exists:

❯ cat external/solid/jsx-runtime.d.ts
export * from "./solid/jsx";

❯ ls -l external/solid/solid/jsx.d.ts
-rw-r--r--  1 tmm1  staff  73590 Apr  4 17:34 external/solid/solid/jsx.d.ts

Is this due to compilerOptions.paths?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions