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

【2.0.0-beta4】小程序文件watch状态下,jsx写错后,即使代码重新正确,控制台还是一致显示”正在编译...“ #4949

Closed
shenghanqin opened this issue Nov 28, 2019 · 2 comments
Assignees

Comments

@shenghanqin
Copy link
Collaborator

问题描述

小程序文件watch监听修改状态下,如果jsx写错后,即使代码重新正确,控制台还是一致显示”正在编译...“

复现步骤

  1. 命令行启动编译, npm run build:weapp -- --watch
  2. jsx上写错,如下方示例
  3. 控制台一直显示”正在编译...“
// block那里故意写错,导致jsx有错误
return (
      <PageWrapper>
        <View className='index'>
          <View class='user-info'>
            {
              !isLogin
                ? this.renderUnlogin()
                : (
                  <Block>
                    <Image className='user-info-avatar' src={userInfo.avatar} backgroundSize='cover'></Image>
                    <Text className='user-info-nickname'>{userInfo.nickName}</Text>
                  {/* </Block> */}
                )

            }
          </View>
          <LoginBtn
            ref={this.loginBtnRef}
          />
        </View>
      </PageWrapper>
    )

期望行为

可以重新正常编译。

报错信息

⠼ 正在编译...编译  发现入口  src/app.js
/Users/hanqin/work/taro-framework/src/pages/index/index.js: Expected corresponding JSX closing tag for <Block> (59:10)


/Users/hanqin/work/taro-framework/src/pages/index/index.js: Expected corresponding JSX closing tag for <Block> (59:10)


⠹ 正在编译...

系统信息

👽 Taro v 2.0.0-beta.4


  Taro CLI 1.3.25 environment info:
    System:
      OS: macOS 10.15.1
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.14.1 - ~/.nvm/versions/node/v10.14.1/bin/node
      Yarn: 1.17.3 - ~/.nvm/versions/node/v10.14.1/bin/yarn
      npm: 6.12.0 - ~/.nvm/versions/node/v10.14.1/bin/npm
    npmPackages:
      @tarojs/async-await: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/cli: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/components: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/plugin-babel: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/plugin-csso: ^2.0.0-beta.3 => 2.0.0-beta.4
      @tarojs/plugin-stylus: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/plugin-uglifyjs: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/redux: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/redux-h5: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/router: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro-alipay: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro-h5: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro-swan: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro-tt: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/taro-weapp: ^2.0.0-beta.4 => 2.0.0-beta.4
      @tarojs/webpack-runner: ^2.0.0-beta.4 => 2.0.0-beta.4
      eslint-config-taro: ^2.0.0-beta.4 => 2.0.0-beta.4
      eslint-plugin-taro: ^2.0.0-beta.4 => 2.0.0-beta.4
      nerv-devtools: ^1.5.5 => 1.5.5
      nervjs: ^1.5.5 => 1.5.5
      stylelint-config-taro-rn: ^2.0.0-beta.4 => 2.0.0-beta.4
      stylelint-taro-rn: ^2.0.0-beta.4 => 2.0.0-beta.4

补充信息

如果您有功能上的建议,可以提到 FeatHub

使用上的问题,欢迎在「Taro 社区」一起交流

@taro-bot
Copy link

taro-bot bot commented Nov 28, 2019

CC @luckyadam

@taro-bot
Copy link

taro-bot bot commented Nov 28, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

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

2 participants