我使用"@material-ui/core": "^3.9.3"
与"@material-ui/pickers": "^3.0.0-beta.1"
当我从中导入任何内容时,@material-ui/pickers
都会得到:
Uncaught TypeError: Object(...) is not a function
at Module../node_modules/@material-ui/pickers/dist/material-ui-pickers.esm.js (material-ui-pickers.esm.js:25)
at __webpack_require__ (bootstrap:781)
at fn (bootstrap:149)
at Module../src/views/Event/Create.js (User.js:18)
at __webpack_require__ (bootstrap:781)
at fn (bootstrap:149)
at Module../src/Routes.js (Routes.js:1)
at __webpack_require__ (bootstrap:781)
at fn (bootstrap:149)
at Module../src/layouts/Admin.jsx (index.js:73)
at __webpack_require__ (bootstrap:781)
at fn (bootstrap:149)
at Module../src/index.js (index.css?02e3:45)
at __webpack_require__ (bootstrap:781)
at fn (bootstrap:149)
at Object.0 (Notifications.jsx:300)
at __webpack_require__ (bootstrap:781)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
确保这@material-ui/pickers
是新的npm软件包,可提供下一个版本。而且@material-ui/core
至少需要v4.0.0-beta.0
对于旧的v3版本的material-ui,请使用material-ui-pickers
package和v2.2.4版本
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句