element-ui2.0.7升级2.13.1,浏览器报错: Object(...) is not a function

新手上路,请多包涵

element-ui从2.0.7升级到2.13.1版本之后,浏览器报错:
element-ui.common.js?a187:37656 Uncaught TypeError: Object(...) is not a function

at Module.eval (element-ui.common.js?a187:37656)
at __webpack_require__ (element-ui.common.js?a187:21)
at Object.eval (element-ui.common.js?a187:356)
at __webpack_require__ (element-ui.common.js?a187:21)
at eval (element-ui.common.js?a187:85)
at eval (element-ui.common.js?a187:88)
at Object.<anonymous> (app.js:5042)
at __webpack_require__ (app.js:660)
at fn (app.js:86)
at eval (420:8)
![升级报错.JPG](/img/bVbGocK)
阅读 3.7k
1 个回答

已解决。换了几个版本,2.10.1版本及以下不会有这个错。于是安装了2.10.1版本,安装之后浏览器不报错,页面也显示出来了,但页面里el-tooptip失效,查了el-tooptip失效这个问题(参考),删除掉node_modules,然后重新 npm install 之后,解决失效问题。接着我又 npm update element-ui,然后上面的浏览器报错问题也解决了。
所以问题解决办法应该是:删除node_modules,然后重新安装就可以了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题