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

小程序编译提示canvasEl.addEventListener is not a function #41

Open
kevinjie opened this issue Feb 27, 2020 · 9 comments
Open

小程序编译提示canvasEl.addEventListener is not a function #41

kevinjie opened this issue Feb 27, 2020 · 9 comments

Comments

@kevinjie
Copy link

我按照官方的示例使用,结果编译成小程序的时候出现以下错误,请问如何解决?
截屏2020-02-2717 43 47
截屏2020-02-2717 44 46

我的环境:
"dependencies": {
"@antv/f2": "^3.6.0-alpha.1",
"@tarojs/components": "2.0.1",
"@tarojs/components-qa": "2.0.1",
"@tarojs/mobx": "2.0.1",
"@tarojs/mobx-h5": "2.0.1",
"@tarojs/router": "2.0.1",
"@tarojs/taro": "2.0.1",
"@tarojs/taro-alipay": "2.0.1",
"@tarojs/taro-h5": "2.0.1",
"@tarojs/taro-qq": "2.0.1",
"@tarojs/taro-quickapp": "2.0.1",
"@tarojs/taro-swan": "2.0.1",
"@tarojs/taro-tt": "2.0.1",
"@tarojs/taro-weapp": "2.0.1",
"babel-runtime": "^6.26.0",
"mobx": "4.8.0",
"nerv-devtools": "^1.5.5",
"nervjs": "^1.5.5",
"taro-f2": "^2.2.0",
"taro-ui": "^2.2.4"
},
"devDependencies": {
"babel-plugin-transform-runtime": "^6.23.0",
"@types/react": "^16.4.6",
"@types/webpack-env": "^1.13.6",
"@tarojs/mini-runner": "2.0.1",
"@tarojs/webpack-runner": "2.0.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-jsx-stylesheet": "^0.6.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-eslint": "^8.2.3",
"eslint": "^5.16.0",
"eslint-config-taro": "2.0.1",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.1",
"eslint-plugin-import": "^2.12.0",
"stylelint": "9.3.0",
"stylelint-config-taro-rn": "2.0.1",
"stylelint-taro-rn": "2.0.1",
"eslint-plugin-taro": "2.0.1",
"@typescript-eslint/eslint-plugin": "^2.13.0",
"@typescript-eslint/parser": "^2.13.0",
"typescript": "^3.0.1"
}

@BODhaha
Copy link

BODhaha commented Feb 29, 2020

请问你解决了吗@kevinjie

@kevinjie
Copy link
Author

kevinjie commented Mar 1, 2020

请问你解决了吗@kevinjie

没有

@edwards19900128
Copy link

有解答了么。。。

@sillyhong
Copy link

sillyhong commented Mar 18, 2020

本人解决方案:npm包降级"@antv/f2": "^3.1.22"

如题主截图所示,高版本的@antv/f2最后打包出来的文件中包含了dom事件监听,小程序不兼容

@BoringDays
Copy link

这样一直靠旧版吊命也不是办法,还是得看看有什么办法保证和新版f2接轨才行

@lechenging
Copy link

@sillyhong 更换3.1.22版本后,小程序图表不现实了

@hana333
Copy link

hana333 commented Apr 18, 2020

@sillyhong 降级后滚动条interaction/pan,ScrollBar用不了。。有什么别的好的办法么?

@lucky126
Copy link

3.1.22降级不了,yarn失败了

@BarleyBig
Copy link

看了一下f2的日志,是在3.6的时候新增了一些事件,然后降级到了3.5,可以正确编译运行
f2更新日志

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants