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

vue3的 小程序运行这样 h5是正常的 #8968

Closed
pupillxy opened this issue Mar 27, 2021 · 4 comments · Fixed by #8994
Closed

vue3的 小程序运行这样 h5是正常的 #8968

pupillxy opened this issue Mar 27, 2021 · 4 comments · Fixed by #8994
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@pupillxy
Copy link

相关平台

微信小程序

小程序基础库: 2.16.0
使用框架: Vue 3

复现步骤

小程序编译用小程序工具运行的时候报错,h5是可以的

期望结果

正常运行

实际结果

VM511 WAService.js:2 ReferenceError: SVGElement is not defined
at Object.app.mount (runtime-dom.esm-bundler.js:1253)
at wA.value (vue3.ts:167)
at wA. (VM511 WAService.js:2)
at new wA (VM511 WAService.js:2)
at Function. (VM511 WAService.js:2)
at VM511 WAService.js:2
at Module../src/app.js (app.js?da32:10)
at webpack_require (bootstrap:79)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
errorReport @ VM511 WAService.js:2
thirdErrorReport @ VM511 WAService.js:2
(anonymous) @ VM511 WAService.js:2
(anonymous) @ VM511 WAService.js:2
wA @ VM511 WAService.js:2
(anonymous) @ VM511 WAService.js:2
(anonymous) @ VM511 WAService.js:2
./src/app.js @ app.js?da32:10
webpack_require @ bootstrap:79
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ app.js:6
require @ VM511 WAService.js:2
(anonymous) @ VM529:3
doWhenAllScriptLoaded @ VM528:80
scriptLoaded @ VM528:100
(anonymous) @ VM528:125
Promise.then (async)
(anonymous) @ VM528:151
(anonymous) @ VM528:155
loadScripts @ assubloader.js:1
async function (async)
loadScripts @ assubloader.js:1
loadAppResourceScripts @ assubloader.js:1
(anonymous) @ VM524:1
t.loadScripts @ VM9 asdebug.js:1
loadAppService @ VM9 asdebug.js:1
messagerCallback @ VM9 asdebug.js:1
(anonymous) @ VM9 asdebug.js:1
f @ VM9 asdebug.js:1
g @ VM9 asdebug.js:1
(anonymous) @ VM9 asdebug.js:1
_ws.onmessage @ VM9 asdebug.js:1
VM511 WAService.js:2 TypeError: Cannot read property '$forceUpdate' of undefined
at Object.updateAppInstance (vue3.ts:148)
at Object.mount (vue3.ts:139)
at mount (common.ts:120)
at se.onLoad (common.ts:134)
at se. (VM511 WAService.js:2)
at se.c.callPageLifeTime (VM511 WAService.js:2)
at Le (VM511 WAService.js:2)
at VM511 WAService.js:2
at Ye (VM511 WAService.js:2)
at Function. (VM511 WAService.js:2)

环境信息

Taro CLI 3.1.4 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.18.3 - C:\Program Files\nodejs\node.EXE
      npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD


@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Mar 27, 2021
@yangjisen
Copy link

我在taro-ui-vue3也提了一个
小程序报错

@Kobshobe
Copy link

同样问题

@chenlin666
Copy link

解决了吗

@Chen-jj Chen-jj linked a pull request Mar 31, 2021 that will close this issue
20 tasks
@Chen-jj Chen-jj added this to the 3.1.5 milestone Mar 31, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 31, 2021

感谢 @b2nil 的 PR,3.1.5 修复~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants