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

H5: TypeError: Cannot read property 'charAt' of undefined #2592

Closed
fjc0k opened this issue Mar 26, 2019 · 9 comments
Closed

H5: TypeError: Cannot read property 'charAt' of undefined #2592

fjc0k opened this issue Mar 26, 2019 · 9 comments
Assignees

Comments

@fjc0k
Copy link
Contributor

fjc0k commented Mar 26, 2019

问题描述

image

复现步骤

  1. git clone https://github.com/fjc0k/mounted
  2. yarn
  3. yarn dev:h5

期望行为

h5正常。

报错信息

如上。

系统信息

  Taro CLI 1.2.21 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.4.0 - /usr/local/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.8.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 1.2.21 => 1.2.21 
      @tarojs/components: 1.2.21 => 1.2.21 
      @tarojs/plugin-babel: 1.2.21 => 1.2.15 
      @tarojs/plugin-csso: 1.2.21 => 1.2.15 
      @tarojs/plugin-sass: 1.2.21 => 1.2.15 
      @tarojs/plugin-uglifyjs: 1.2.21 => 1.2.15 
      @tarojs/router: 1.2.21 => 1.2.21 
      @tarojs/taro: 1.2.21 => 1.2.15 
      @tarojs/taro-alipay: 1.2.21 => 1.2.15 
      @tarojs/taro-h5: 1.2.21 => 1.2.21 
      @tarojs/taro-swan: 1.2.21 => 1.2.15 
      @tarojs/taro-tt: 1.2.21 => 1.2.21 
      @tarojs/taro-weapp: 1.2.21 => 1.2.15 
      @tarojs/webpack-runner: 1.2.21 => 1.2.21 
      nervjs: ^1.3.9 => 1.3.13 
@taro-bot
Copy link

taro-bot bot commented Mar 26, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche yuche added the H5 label Mar 26, 2019
@taro-bot
Copy link

taro-bot bot commented Mar 26, 2019

CC @Littly

@Littly
Copy link
Contributor

Littly commented Mar 27, 2019

确实有问题,我们修复下。
在修复之前,先把app.tsx改为app.js,去掉ts语法,可以规避这个问题~

@fjc0k
Copy link
Contributor Author

fjc0k commented Mar 27, 2019

@Littly 好的,静候佳音。

@xoptimal
Copy link

xoptimal commented Jul 5, 2019

这个仍然存在 @Littly
我在 app.js 下, 将pages 配置单独写一个 constants 管理引进 , 结果报以下错误

Cannot read property 'charAt' of undefined

@fjc0k
Copy link
Contributor Author

fjc0k commented Jul 5, 2019

的确,Taro 最新版这个问题又出现了。

@xoptimal
Copy link

xoptimal commented Jul 5, 2019

@fjc0k 刚我问了小李了, 不允许这样定义, 只能只通过硬性写入, 这样才能确保是常量~

@fjc0k
Copy link
Contributor Author

fjc0k commented Jul 5, 2019

@xoptimal 我说的是这个 issue 的原始问题在新版又出现了,不是你所述的问题🤨

@liulinaxue
Copy link

@xoptimal 我说的是这个 issue 的原始问题在新版又出现了,不是你所述的问题🤨

请问你解决这个问题了吗

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

5 participants