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

taro默认模版,编译H5运行后报错:Uncaught TypeError: e.on is not a function #14735

Closed
doudou673 opened this issue Oct 31, 2023 · 2 comments
Labels
F-react Framework - React question Further information is requested T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@doudou673
Copy link

相关平台

H5

浏览器版本: Chorme 版本 118.0.5993.117(正式版本) (arm64)
使用框架: React

复现步骤

taro init选择React,使用TS,Less,Webpack5,npm,Gitee,默认模版。然后在项目中运行npm run dev:h5,浏览器中F12切换h5设备,首次会显示页面,但是刷新一下就会报错,报错内容:

VM20239:10 Uncaught TypeError: e.on is not a function
at l (:10:3333)
at a (:10:3542)
at :10:3914

期望结果

浏览器正常运行,刷新后不会报错

实际结果

首次会显示页面,但是刷新一下就会报错,报错内容:

VM20239:10 Uncaught TypeError: e.on is not a function
at l (:10:3333)
at a (:10:3542)
at :10:3914

环境信息

👽 Taro v3.6.8


  Taro CLI 3.6.8 environment info:
    System:
      OS: macOS 12.4
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 14.20.0 - ~/.nvm/versions/node/v14.20.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v14.20.0/bin/yarn
      npm: 6.14.17 - ~/.nvm/versions/node/v14.20.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.8 => 3.6.8 
      @tarojs/components: 3.6.8 => 3.6.8 
      @tarojs/helper: 3.6.8 => 3.6.8 
      @tarojs/plugin-framework-react: 3.6.8 => 3.6.8 
      @tarojs/plugin-platform-alipay: 3.6.8 => 3.6.8 
      @tarojs/plugin-platform-h5: 3.6.8 => 3.6.8 
      @tarojs/plugin-platform-weapp: 3.6.8 => 3.6.8 
      @tarojs/react: 3.6.8 => 3.6.8 
      @tarojs/runtime: 3.6.8 => 3.6.8 
      @tarojs/shared: 3.6.8 => 3.6.8 
      @tarojs/taro: 3.6.8 => 3.6.8 
      @tarojs/webpack5-runner: 3.6.8 => 3.6.8 
      babel-preset-taro: 3.6.8 => 3.6.8 
      eslint-config-taro: 3.6.8 => 3.6.8 
      react: ^18.0.0 => 18.2.0 
      taro-ui: ^3.1.1 => 3.1.1 

补充信息

node 14

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Oct 31, 2023
@doudou673
Copy link
Author

image

@ZakaryCode ZakaryCode added the question Further information is requested label Nov 1, 2023
@ZakaryCode
Copy link
Contributor

提供信息无法定位相关问题,可尝试进一步判断报错代码,或者尝试升级修复该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React question Further information is requested T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

2 participants