Material-ui: [Typescript] 3.1.0 Namespace 'global.JSX' has no exported member 'LibraryManagedAttributes'.

Created on 24 Sep 2018  路  3Comments  路  Source: mui-org/material-ui

  • [x] This is not a v0.x issue.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior


No error should be given

Current Behavior


An error when compiling using typescript after upgrade from 3.0.3 to 3.1.0

Steps to Reproduce


Build typescript project with material-ui installed from npm.

Context

................................................................................/node_modules/@material-ui/core/index.d.ts
(72,12): Namespace 'global.JSX' has no exported member 'LibraryManagedAttributes'.

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | v3.1.0 |
| React | v16.3.2 |
| Browser | Any |
| TypeScript | v3.0.1 |
| etc. | |

typescript

Most helpful comment

Try upgrading @types/react

All 3 comments

Try upgrading @types/react

@go2ready
I had the same issue. Solved by using following versions:

{
  "name": "create-react-app-material-typescript-redux",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "@material-ui/core": "3.1.1",
    "@material-ui/icons": "3.0.1",
    "react": "16.5.2",
    "react-dom": "16.5.2",
    "react-redux": "^5.0.7",
    "react-router": "^4.2.0",
    "react-scripts-ts": "latest",
    "redux": "^3.7.2",
    "redux-logger": "3.0.6",
    "redux-persist": "^5.5.0",
    "redux-thunk": "^2.2.0"
  },
  "devDependencies": {
    "@types/history": "^4.6.2",
    "@types/jest": "22.1.0",
    "@types/node": "9.4.0",
    "@types/react": "16.4.14",
    "@types/react-dom": "16.0.7",
    "@types/react-redux": "^5.0.19",
    "@types/react-router": "^4.0.18",
    "@types/redux-logger": "^3.0.5",
    "@types/webpack-env": "^1.13.5",
    "csstype": "^2.4.2",
    "redux-devtools-extension": "^2.13.2",
    "typescript": "3.0.3"
  },
  "scripts": {
    "start": "react-scripts-ts start",
    "build": "react-scripts-ts build",
    "test": "react-scripts-ts test --env=jsdom",
    "eject": "react-scripts-ts eject"
  }
}

source:
https://github.com/innFactory/create-react-app-material-typescript-redux/blob/master/package.json

Thanks for the help guys! We should add this to the release note tho.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reflog picture reflog  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

pola88 picture pola88  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments