我试图从@material-ui/core@3.9.3切换到material v4.4.3的最新当前版本,但是我得到了这个错误

对于我来说,不清楚这个问题发生在哪段代码中,以及如何修复它。也许有人对此有一些想法?另外,你可以在package.json文件中检查我的所有依赖项。请让我知道你需要哪些信息,如果它不清楚,我会附上它。
"dependencies": {
"@babel/runtime": "7.1.5",
"@date-io/date-fns": "0.0.2",
"@material-ui/core": "4.4.3",
"@material-ui/icons": "3.0.1",
"@material-ui/pickers": "3.2.6",
"axios": "0.19.0",
"classnames": "2.2.6",
"compression-webpack-plugin": "3.0.0",
"connected-react-router": "6.4.0",
"date-fns": "2.0.0-alpha.27",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"history": "4.6.3",
"humps": "2.0.0",
"jss": "^10.0.0",
"jss-camel-case": "6.1.0",
"jss-default-unit": "8.0.2",
"jss-expand": "5.3.0",
"jss-extend": "6.2.0",
"jss-global": "3.0.0",
"jss-nested": "6.0.1",
"jss-props-sort": "6.0.0",
"jss-vendor-prefixer": "8.0.1",
"lodash": "4.17.14",
"moment": "2.23.0",
"normalizr": "3.3.0",
"prop-types": "15.6.2",
"qs": "6.5.2",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-dropzone": "10.1.4",
"react-hot-loader": "4.8.8",
"react-image": "2.1.1",
"react-intl": "2.7.2",
"react-intl-po": "2.2.2",
"react-intl-redux": "2.0.2",
"react-jss": "^10.0.0",
"react-motion": "0.5.2",
"react-pose": "4.0.8",
"react-redux": "7.0.3",
"react-router": "4.3.1",
"react-router-dom": "4.3.1",
"react-spinners": "0.4.7",
"react-universal-component": "4.0.0",
"recompose": "0.30.0",
"redux": "4.0.1",
"redux-axios-middleware": "4.0.0",
"redux-devtools-extension": "2.13.8",
"redux-form": "8.2.2",
"redux-form-validators": "^3.2.2",
"redux-immutable-state-invariant": "2.1.0",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0",
"store2": "2.7.1",
"uglifyjs-webpack-plugin": "2.0.1"
}发布于 2019-10-03 23:01:23
我也有同样的问题。更新prop-type包对我很有效。我使用的是prop-types@15.6.0版本,但material v4将prop-types@^15.7.2声明为依赖项。因此,请尝试在应用程序中干净地安装prop-type。这对我很有效。
npm uninstall prop-types;
npm install --save-exact prop-types@15.7.2;我是怎么想的:如果你点击了SelectInput.js:361,它会把你带到下面这一行

它解析为prop-type包。

希望这能有所帮助
发布于 2019-09-26 12:51:32
尝尝这个,
import {PropTypes} from "prop-types";https://stackoverflow.com/questions/58109564
复制相似问题