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

After 2.2.12 @tarojs/transformer-wx break built #7216

Closed
Eric-Guo opened this issue Jul 31, 2020 · 7 comments
Closed

After 2.2.12 @tarojs/transformer-wx break built #7216

Eric-Guo opened this issue Jul 31, 2020 · 7 comments
Assignees
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-2 Version - 2.x

Comments

@Eric-Guo
Copy link

Eric-Guo commented Jul 31, 2020

#6001

准确的说,是这个PR导致的问题,目前降级到@tarojs/mini-runner到v2.2.11就可以了。

相关平台

微信小程序

小程序基础库: 2.11.3
使用框架: React

复现步骤

升级到2.2.12

期望结果

Build出来的程序可以运行

实际结果

loading 失败,运行时报错。

MiniProgramError
_$uid is not defined
ReferenceError: _$uid is not defined
    at http://127.0.0.1:10780/appservice/components/events-list/index.js:1:3843
    at Array.map ()
    at EventsList._createData (http://127.0.0.1:10780/appservice/components/events-list/index.js:1:3424)
    at doUpdate (http://127.0.0.1:10780/appservice/taro.js:2:54050)
    at mountComponent (http://127.0.0.1:10780/appservice/taro.js:2:52303)
    at Je.initComponent (http://127.0.0.1:10780/appservice/taro.js:2:52365)
    at Je.observer (http://127.0.0.1:10780/appservice/taro.js:2:67458)
    at Function.r.safeCallback (http://127.0.0.1:10780/appservice/__dev__/WAService.js:2:1827260)
    at n. (http://127.0.0.1:10780/appservice/__dev__/WAService.js:2:1865633)
    at a.doUpdates (http://127.0.0.1:10780/appservice/__dev__/WAService.js:2:1882634)

环境信息

  Taro CLI 2.2.12 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.0.18 - /usr/local/bin/bash
    Binaries:
      Node: 14.7.0 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.7 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 2.2.12 => 2.2.12 
      @tarojs/components-qa: 2.2.12 => 2.2.12 
      @tarojs/mini-runner: 2.2.12 => 2.2.12
      @tarojs/plugin-babel: 2.2.12 => 2.2.12 
      @tarojs/plugin-sass: 2.2.12 => 2.2.12 
      @tarojs/plugin-terser: 2.2.12 => 2.2.12 
      @tarojs/redux: 2.2.12 => 2.2.12 
      @tarojs/redux-h5: 2.2.12 => 2.2.12 
      @tarojs/router: 2.2.12 => 2.2.12 
      @tarojs/taro: 2.2.12 => 2.2.12 
      @tarojs/taro-alipay: 2.2.12 => 2.2.12 
      @tarojs/taro-h5: 2.2.12 => 2.2.12 
      @tarojs/taro-qq: 2.2.12 => 2.2.12 
      @tarojs/taro-quickapp: 2.2.12 => 2.2.12 
      @tarojs/taro-rn: 2.2.12 => 2.2.12 
      @tarojs/taro-swan: 2.2.12 => 2.2.12 
      @tarojs/taro-tt: 2.2.12 => 2.2.12 
      @tarojs/taro-weapp: 2.2.12 => 2.2.12 
      @tarojs/webpack-runner: 2.2.12 => 2.2.12 
      eslint-config-taro: 2.2.12 => 2.2.12 
      eslint-plugin-taro: 2.2.12 => 2.2.12 
      nerv-devtools: ^1.5.7 => 1.5.7 
      nervjs: ^1.5.7 => 1.5.7 
      stylelint-config-taro-rn: 2.2.12 => 2.2.12 
      stylelint-taro-rn: 2.2.12 => 2.2.12 
      taro-ui: ^2.3.4 => 2.3.4 
    npmGlobalPackages:
      typescript: 3.9.7
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-2 Version - 2.x labels Jul 31, 2020
@Eric-Guo
Copy link
Author

正常生成和非正常生成的:

-var _$indexKey = "jzzzz" + __index0;
+var _$indexKey = _$uid + __index0;

生成的代码里面没有_$uid,好神奇!

@luckyadam
Copy link
Member

麻烦提供个 demo 看下

@Eric-Guo
Copy link
Author

Eric-Guo commented Jul 31, 2020

能加微信传给你吗?代码不方便开源。

@luckyadam
Copy link
Member

ec_guo

@luckyadam
Copy link
Member

暂时先把这个改动撤销了,2.2.13 正常,后续会看看这里应该如何调整

@dreamthen
Copy link

这边出现同样的问题,现在2.2.13还没发布是嘛?

@Eric-Guo
Copy link
Author

已经发布了,阿里云同步这两天有问题,切换到官方就好了。

-npm config set registry https://registry.npmjs.com/ --global
+npm config set registry https://registry.npm.taobao.org/ --global

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

No branches or pull requests

3 participants