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启动时报错, [React Refresh] Hot Module Replacement (HMR) is not enabled! React Refresh requires HMR to function properly. #11623

Closed
yuanxin778 opened this issue Apr 12, 2022 · 3 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@yuanxin778
Copy link

相关平台

微信小程序

小程序基础库: h5
使用框架: React

复现步骤

当我npm run dev:h5启动时报错, 报错的文件为:D:\project\DaHua-H5\node_modules@tarojs\plugin-framework-react\node_modules@pmmmwh\react-refresh-webpack-plugin\lib\index.js:219

报错信息:[React Refresh] Hot Module Replacement (HMR) is not enabled! React Refresh requires HMR to function properly.

期望结果

正常启动

实际结果

没有正常启动

环境信息

👽 Taro v3.0.29

79 undefined {
  env: { NODE_ENV: '"production"' },
  defineConstants: {},
  csso: { enable: true },
  mini: {},
  h5: { router: { mode: 'browser', basename: '/h5' }, publicPath: '/h5' }
} undefined

  Taro CLI 3.0.29 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Users\ruler6124\AppData\Roaming\npm\yarn.CMD
      npm: 8.4.1 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 12, 2022
@ZakaryCode ZakaryCode added T-h5 Target - 编译到 H5 and removed T-weapp Target - 编译到微信小程序 labels Apr 12, 2022
@ZakaryCode
Copy link
Contributor

可升级修复,如依旧可提交最小可复现demo

@yuanxin778
Copy link
Author

如何升级? 升级对现有的代码会产生影响吗?

@ZakaryCode
Copy link
Contributor

taro update self
taro update project

升级影响可阅读相关版本公告自行了解

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

No branches or pull requests

2 participants