ecomfe / vue-echarts

Vue.js component for Apache ECharts™.
https://vue-echarts.dev
MIT License
9.43k stars 1.48k forks source link

vue-echarts@6.0.0报错Object(...) is not a function #701

Closed Zwanwei closed 1 year ago

Zwanwei commented 1 year ago

请确认

您是如何将 Vue-ECharts 引入项目的?

通过 ES 模块 import

版本信息

+-- echarts@5.1.2
`-- vue-echarts@6.0.0
  `-- echarts@5.1.2 deduped

问题详情

image

script标签vue2.5.2+ES模块import echarts@5.1.2 vue-echarts@6.0.0 报错Object(...) is not a function,原来是正常的,今天换了一台设备clone项目就不行了

"@vue/cli-plugin-babel": "^3.0.1", "@vue/cli-plugin-eslint": "^3.0.1", "@vue/cli-service": "^3.0.1", "@vue/composition-api": "^1.0.5", "babel-eslint": "^10.0.1", "echarts": "^5.1.2", "electron": "^17.1.0", "electron-devtools-installer": "3.1.1", "electron-icon-builder": "^2.0.1", "electron-log": "^4.4.8", "electron-updater": "^5.2.1", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", "html2canvas": "^1.4.1", "less": "^4.1.2", "less-loader": "^5.0.0", "style-resources-loader": "^1.5.0", "tslib": "^2.3.0", "vue-cli-plugin-electron-builder": "^2.1.1", "vue-cli-plugin-style-resources-loader": "^0.1.5", "vue-demi": "^0.12.1", "vue-echarts": "^6.0.0", "vue-template-compiler": "^2.6.10"

问题复现

https://codesandbox.io/embed/suspicious-glitter-mk66j?fontsize=14&hidenavigation=1&theme=dark

Justineo commented 1 year ago

Please provide a minimal reproduction.

Zwanwei commented 1 year ago

Please provide a minimal reproduction.

1677427230838 image https://codesandbox.io/embed/loving-turing-vbxoqt?fontsize=14&hidenavigation=1&theme=dark 这个环境无法在codesandbox运行,内置浏览器无法显示

Justineo commented 1 year ago

可以新建一个 GitHub repo。

vCloudSail commented 2 months ago

我也遇到这个问题了,怎么解决的呢

Zwanwei commented 2 months ago

我也遇到这个问题了,怎么解决的呢

当时记得是可能是npm包管理器下载的包不稳定,或没有锁版本,echarts或echarts下依赖的库版本有变动更新问题,当时把正常运行的电脑环境的echarts包复制过来发现就正常了,当时还对依赖进行了比对,依赖中的代码确实是有不同的地方

Zwanwei commented 2 months ago

我也遇到这个问题了,怎么解决的呢

当时记得是可能是npm包管理器下载的包不稳定,或没有锁版本,echarts或echarts下依赖的库版本有变动更新问题,当时把正常运行的电脑环境的echarts包复制过来发现就正常了,当时还对依赖进行了比对,依赖中的代码确实是有不同的地方