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

npm run dev:h5 chrome 控制台 报错 #1650

Closed
Gxuebin opened this issue Dec 23, 2018 · 4 comments
Closed

npm run dev:h5 chrome 控制台 报错 #1650

Gxuebin opened this issue Dec 23, 2018 · 4 comments
Labels
question Further information is requested

Comments

@Gxuebin
Copy link

Gxuebin commented Dec 23, 2018

npm run dev:h5 

![image](https://user-images.githubusercontent.com/20697809/50382425-b83a2900-06d9-11e9-99bd-60856da25e5e.png)

👽 Taro v1.2.1


  Taro CLI 1.2.1 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.1.0 - /usr/local/bin/node
      Yarn: 1.12.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 1.2.0 => 1.2.0
      @tarojs/plugin-babel: 1.2.0 => 1.2.0
      @tarojs/plugin-csso: 1.2.0 => 1.2.0
      @tarojs/plugin-less: 1.2.0 => 1.2.0
      @tarojs/plugin-sass: 1.2.0 => 1.2.0
      @tarojs/plugin-uglifyjs: 1.2.0 => 1.2.0
      @tarojs/router: 1.2.0 => 1.2.0
      @tarojs/taro: 1.2.0 => 1.2.0
      @tarojs/taro-h5: 1.2.0 => 1.2.0
      @tarojs/taro-weapp: 1.2.0 => 1.2.0
      @tarojs/webpack-runner: 1.2.0 => 1.2.0
      eslint-config-taro: 1.2.0 => 1.2.0
      eslint-plugin-taro: 1.2.0 => 1.2.0


@taro-bot
Copy link

taro-bot bot commented Dec 23, 2018

欢迎提交 Issue~

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

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

Good luck and happy coding~

@zhengzhuang96
Copy link

这个问题,你可以打开项目的config文件夹的index.js文件,在添加
h5: { devServer: { disableHostCheck: true }, }
添加之后重新编译就好了

@yuche yuche added question Further information is requested answered labels Dec 24, 2018
@taro-bot
Copy link

taro-bot bot commented Dec 24, 2018

Hello~

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

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

Good luck and happy coding~

@fjc0k
Copy link
Contributor

fjc0k commented Dec 26, 2018

使用 taro dev h5 后,它是自动打开浏览器的,因此,这应该由 taro 解决,而不是视为一个 question。

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

4 participants