Skip to content

[Bug]: Namespace 'React' has no exported member 'JSX'. #10824

Closed
@su-kialo

Description

@su-kialo

What version of React Router are you using?

v6.15.0

Steps to Reproduce

react Version: v16.14.0
react-domVersion: v16.14.0

react-router-dom version v.6.15.0

  1. Run tsc with the following tsconfig
{
 // ...
    "compilerOptions": {
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "noEmit": true,
        "experimentalDecorators": true,
        "importHelpers": true,
        "jsx": "preserve",
        "module": "esnext",
        "moduleResolution": "node",
        "sourceMap": true,
        "strict": true,
        "target": "es2015",
        "noErrorTruncation": false,
        "lib": ["dom", "es6", "dom.iterable", "scripthost", "es2016.array.include"],
        "noUnusedLocals": true,
        "resolveJsonModule": true
    },
 // ...
}

Expected Behavior

No errors to be reported.
Typescript should build successfully

Actual Behavior

The following error is reported by the Typescript compiler.

Error: node_modules/react-router-dom/dist/index.d.ts(36,107): error TS2694: Namespace 'React' has no exported member 'JSX'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions