TypeError: utils.inherits is not a function
ZvonimirSun opened this issue · 4 comments
ZvonimirSun commented
Request a feature or report a bug? [这是一个需求还是一个缺陷]
缺陷
One-line summary [问题简述]
在vite2 + vue3中,只要import @supermap/iclient-leaflet
中的内容,即使没有被调用也会报错TypeError: utils.inherits is not a function
,导致页面加载失败。
Version [产品及版本]
- iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iClient for leaflet
- iClient version [iClient 版本]: 10.2.0
- Browser version [浏览器类型和版本]: edge 94.0.992.38
- OS Version [操作系统类型和版本]: win10 21H1, nodejs 14.17.5
Actual Behavior [当前现象]
在vite2 + vue3中,只要import @supermap/iclient-leaflet
中的内容,即使没有被调用也会报这个错,导致页面加载失败。
Expected Behavior [期望现象]
能够正常运行
Example of reproducing the issue [重现现象的例子]
import { tiledMapLayer } from '@supermap/iclient-leaflet'
不需要调用就会报错
What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]
在leaflet中加载超图服务
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
lostforwhat commented
最新版10.2.1同样还有这个问题,貌似不兼容vite2,使用vue-cli的就没问题
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
songyumeng commented
see #376