import { types } from "mobx-state-tree";
抛出错误
mobx-state-tree.module.js:2354 Uncaught TypeError: Object(...) is not a function
at CoreType.BaseType (mobx-state-tree.module.js:2354)
at CoreType.SimpleType [as constructor] (mobx-state-tree.module.js:2554)
at new CoreType (mobx-state-tree.module.js:6418)
at Module.<anonymous> (mobx-state-tree.module.js:6491)
at Module../node_modules/mobx-state-tree/dist/mobx-state-tree.module.js (mobx-state-tree.module.js:8319)
at __webpack_require__ (bootstrap:19)
at Module../js/app.js (app.js:1)
at __webpack_require__ (bootstrap:19)
at Object.0 (global.js:20)
at __webpack_require__ (bootstrap:19)
这是为什么?我所做的只是导入。
版本是5.0.0
答案 0 :(得分:0)
我不得不将 mobx 从版本 5 更新到版本 6