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

Taro 4.0.4 微信小程序 transformElement is undefined #16224

Open
ice909 opened this issue Aug 2, 2024 · 6 comments · May be fixed by #16256
Open

Taro 4.0.4 微信小程序 transformElement is undefined #16224

ice909 opened this issue Aug 2, 2024 · 6 comments · May be fixed by #16256
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-4 Version - 4.x

Comments

@ice909
Copy link
Contributor

ice909 commented Aug 2, 2024

相关平台

微信小程序

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

复现步骤

https://github.com/linuxdeepin/bbs-mobile-web
这个项目taro版本从3.6.20 升级到4.0.4之后,在微信小程序中使用transformElement是undefined

期望结果

可以正常使用tranformElement

实际结果

报错,undefined

环境信息

👽 Taro v4.0.4


  Taro CLI 4.0.4 environment info:
    System:
      OS: Linux 6.6 Deepin 23 23
      Shell: 5.9 - /usr/bin/zsh
    Binaries:
      Node: 20.14.0 - ~/.config/nvm/versions/node/v20.14.0/bin/node
      npm: 10.7.0 - ~/.config/nvm/versions/node/v20.14.0/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.4 => 4.0.4 
      @tarojs/components: 4.0.4 => 4.0.4 
      @tarojs/helper: 4.0.4 => 4.0.4 
      @tarojs/plugin-framework-vue3: 4.0.4 => 4.0.4 
      @tarojs/plugin-html: 4.0.4 => 4.0.4 
      @tarojs/plugin-http: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4 
      @tarojs/runtime: 4.0.4 => 4.0.4 
      @tarojs/shared: 4.0.4 => 4.0.4 
      @tarojs/taro: 4.0.4 => 4.0.4 
      @tarojs/taro-loader: 4.0.4 => 4.0.4 
      @tarojs/webpack5-runner: 4.0.4 => 4.0.4 
      babel-preset-taro: 4.0.4 => 4.0.4 
      eslint-config-taro: 4.0.4 => 4.0.4 

@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Aug 2, 2024
@TheKonka
Copy link
Member

TheKonka commented Aug 2, 2024

401不是未授权的报错?

https://github.com/linuxdeepin/bbs-mobile-web/blob/master/package.json
我看这里面taro版本都是3.6.20,没有升级到4.0.4

@ice909
Copy link
Contributor Author

ice909 commented Aug 2, 2024

401不是未授权的报错?

https://github.com/linuxdeepin/bbs-mobile-web/blob/master/package.json 我看这里面taro版本都是3.6.20,没有升级到4.0.4

linuxdeepin/bbs-mobile-web#26
还是pr状态,有这个问题,还不能合并

@ice909 ice909 changed the title 微信小程序报错找不到vendors.js 微信小程序vendors.js报错401 Aug 2, 2024
@TheKonka
Copy link
Member

TheKonka commented Aug 2, 2024

image
401是请求返回的

transformElement报错问题,可以在编译配置里面 临时加下这个 alias,后面新版本修复了再去掉
'@tarojs/runtime': require.resolve('@tarojs/runtime')

@TheKonka TheKonka added V-4 Version - 4.x and removed V-3 Version - 3.x labels Aug 2, 2024
@ice909
Copy link
Contributor Author

ice909 commented Aug 2, 2024

image
401是请求返回的

transformElement报错问题,可以在编译配置里面 临时加下这个 alias,后面新版本修复了再去掉
'@tarojs/runtime': require.resolve('@tarojs/runtime')

@TheKonka 好的,多谢了

@ice909
Copy link
Contributor Author

ice909 commented Aug 5, 2024

@TheKonka 请问taro4.0.4 切换到vite 编译还需要装哪个包么?

@TheKonka
Copy link
Member

TheKonka commented Aug 5, 2024

@TheKonka 请问taro4.0.4 切换到vite 编译还需要装哪个包么?

具体我也不清楚,可以 taro init 一个新项目看看

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-4 Version - 4.x
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants