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

1.3.x 我遇到的两个问题 #3759

Closed
fjc0k opened this issue Jul 10, 2019 · 10 comments
Closed

1.3.x 我遇到的两个问题 #3759

fjc0k opened this issue Jul 10, 2019 · 10 comments
Labels
question Further information is requested

Comments

@fjc0k
Copy link
Contributor

fjc0k commented Jul 10, 2019

问题描述

  1. 仍不支持 const { propA, propB, ...props } = this.props 这种语法,不知道是未注意到还是的确不能实现。使用场景:https://github.com/fjc0k/mounted/blob/v1/src/components/Picker/index.tsx#L89

  2. 组件在特定情况下,第一次编译为被专为 React 组件,在原组件再保存一次触发重新编译方可编译为小程序组件。复现组件:https://github.com/fjc0k/mounted/blob/v1/src/components/PickerView/index.tsx

复现步骤

针对问题 2 的复现步骤:

  1. git clone https://github.com/fjc0k/mounted.git
  2. cd mounted && git checkout v1
  3. yarn && yarn dev:weapp
  4. 进入微信开发者工具,打开项目,进入页面 pages/PickerView

期望行为

问题1:支持该种语法

问题2:第一次编译正常

报错信息

问题1:不支持

问题2:第一次编译错误

系统信息

Taro CLI 1.3.7 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.16.0 - /usr/local/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 1.3.7 => 1.3.7 
      @tarojs/components: 1.3.7 => 1.3.2 
      @tarojs/plugin-babel: 1.3.7 => 1.3.2 
      @tarojs/plugin-csso: 1.3.7 => 1.3.2 
      @tarojs/plugin-sass: 1.3.7 => 1.3.2 
      @tarojs/plugin-uglifyjs: 1.3.7 => 1.3.2 
      @tarojs/router: 1.3.7 => 1.3.2 
      @tarojs/taro: 1.3.7 => 1.3.2 
      @tarojs/taro-alipay: 1.3.7 => 1.3.2 
      @tarojs/taro-h5: 1.3.7 => 1.3.7 
      @tarojs/taro-swan: 1.3.7 => 1.3.2 
      @tarojs/taro-tt: 1.3.7 => 1.3.2 
      @tarojs/taro-weapp: 1.3.7 => 1.3.2 
      @tarojs/webpack-runner: 1.3.7 => 1.3.2 
      nerv-devtools: ^1.4.0 => 1.4.1 
      nervjs: ^1.4.0 => 1.4.1
@taro-bot
Copy link

taro-bot bot commented Jul 10, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Garfield550
Copy link
Collaborator

npmPackages:
  @tarojs/cli: 1.3.7 => 1.3.7 
  @tarojs/components: 1.3.7 => 1.3.2 
  @tarojs/plugin-babel: 1.3.7 => 1.3.2 
  @tarojs/plugin-csso: 1.3.7 => 1.3.2 
  @tarojs/plugin-sass: 1.3.7 => 1.3.2 
  @tarojs/plugin-uglifyjs: 1.3.7 => 1.3.2 
  @tarojs/router: 1.3.7 => 1.3.2 
  @tarojs/taro: 1.3.7 => 1.3.2 
  @tarojs/taro-alipay: 1.3.7 => 1.3.2 
  @tarojs/taro-h5: 1.3.7 => 1.3.7 
  @tarojs/taro-swan: 1.3.7 => 1.3.2 
  @tarojs/taro-tt: 1.3.7 => 1.3.2 
  @tarojs/taro-weapp: 1.3.7 => 1.3.2 
  @tarojs/webpack-runner: 1.3.7 => 1.3.2 
  nerv-devtools: ^1.4.0 => 1.4.1 
  nervjs: ^1.4.0 => 1.4.1

你的依赖出问题了,先删掉 lock 文件和 node_modules 目录重新安装一次吧。

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 11, 2019

@fjc0k CLI 与项目依赖版本保持一致。

@Chen-jj Chen-jj added answered question Further information is requested labels Jul 11, 2019
@fjc0k
Copy link
Contributor Author

fjc0k commented Jul 11, 2019

@Garfield550 @Chen-jj 不是这个问题。你们有 clone 下来实际跑过吗?

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 11, 2019

@fjc0k 你更新了吗?

@fjc0k
Copy link
Contributor Author

fjc0k commented Jul 11, 2019

@Chen-jj 库未更新

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 11, 2019

@fjc0k 那你更新后再试试啊。。。

@fjc0k
Copy link
Contributor Author

fjc0k commented Jul 11, 2019

@Chen-jj 1.3.8 也没更新啥啊

@taro-bot
Copy link

taro-bot bot commented Jul 11, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@Garfield550
Copy link
Collaborator

@Chen-jj 1.3.8 也没更新啥啊

保持依赖版本一致可以避免 CLI 因版本不一致导致的编译问题。根编译有关的很多问题基本都修在编译器(taro-cli)和解释器(taro-transformer-wx)里了。

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

No branches or pull requests

3 participants