Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue项目打包后新建节点报错 #2014

Closed
baguosiji opened this issue Apr 15, 2022 · 7 comments
Closed

vue项目打包后新建节点报错 #2014

baguosiji opened this issue Apr 15, 2022 · 7 comments

Comments

@baguosiji
Copy link

问题描述

本地调试没有问题、build后新建节点时报错Uncaught (in promise) TypeError: e is not a function。

重现链接

重现步骤

预期行为

平台

  • 操作系统: macOS
  • 网页浏览器: Google Chrome
  • X6 版本: [1.31.3]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Apr 15, 2022

👋 @baguosiji

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

能否提供一个可以复现 demo,这样会加快问题定位。

@mlsjla
Copy link

mlsjla commented Apr 16, 2022

疑似与vue版本切换有关。
这边可能识别到的vue版本是3.x 而实际上是用的2.x

与这个问题应该是同一个问题
#1984

复现方法 :
"@antv/layout": "^0.2.2",
"@antv/x6": "^1.31.0",
"@antv/x6-vue-shape": "^1.3.1",
"vue": "^2.6.10",

以上版本。
然后删除node_modules package-lock.json

然后重新构建, 就报错了。

@baguosiji
Copy link
Author

已经解决了 问题出在了 lodash ,我们的项目中用了lodash 按需引入。 但是vue的报错指向了jquery。

@one-superman
Copy link

已经解决了 问题出在了 lodash ,我们的项目中使用了 lodash 按需导入。 但是 vue 的报错指向了 jquery。

请问是怎么解决的呢

@baguosiji
Copy link
Author

@one-superman vue-config.js里面lodash按需引入去掉

@x6-bot
Copy link
Contributor

x6-bot bot commented Mar 22, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants