gpt4 book ai didi

material-ui - Uncaught TypeError : Object(. ..) 在导入@material-ui/pickers 时不是函数

转载 作者:行者123 更新时间:2023-12-04 17:06:24 26 4
gpt4 key购买 nike

我正在使用 "@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

对于material-ui的旧v3版本,使用material-ui-pickers包和版本 v2.2.4

关于material-ui - Uncaught TypeError : Object(. ..) 在导入@material-ui/pickers 时不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56010268/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com