Skip to content

JSX config not working properly, Getting children props error in all of my components #28622

@predystopic-dev

Description

@predystopic-dev

Version: Deno 2.1.9 (stable, release, x86_64-unknown-linux-gnu)
v8 13.0.245.12-rusty
typescript 5.6.2

  1. Issue
    All the react components (from both external libraries and custom made) in my app are giving error Property 'children' is missing in type ....deno-ts(2741)

  2. Steps to reproduce

  • Initialize a fresh react project with deno and create-vite-project by running this command deno run -A npm:create-vite@latest --template react-ts
  • I installed following deps
"dependencies": {
    "@emotion/react": "^11.14.0",
    "@emotion/styled": "^11.14.0",
    "@mui/icons-material": "^6.4.8",
    "@mui/material": "^6.4.8",
    "@mui/system": "^6.4.8",
    "@mui/x-date-pickers": "^7.28.0",
    "eslint-plugin-react": "^7.37.4",
    "path": "^0.12.7",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "react-router-dom": "^7.4.0"
  },
  • Modified my deno.json to use following settings for jsx
{
  "nodeModulesDir": "auto",
  "compilerOptions": {
    "lib": [
      "esnext",
      "ES2020",
      "DOM",
      "DOM.Iterable"
    ],
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  },
  "unstable": [
    "sloppy-imports"
  ]
}
  • Create a React component with Material UI components with children components in them
 <Fade in={true} timeout={1000}>
    <Card sx={{ width: '100%', p: 3 }}>
    ....
    </Card>
</Fade>
  1. Expected Result
    Shouldn't get any error here as the child component for Fade is present

  2. Actual Result
    I get following error
    Property 'children' is missing in type '{ in: true; timeout: number; }' but required in type 'FadeProps'.deno-ts(2741)

Metadata

Metadata

Assignees

No one assigned

    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