-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Open
Labels
A-loaderArea - Webpack loader 相关Area - Webpack loader 相关F-reactFramework - ReactFramework - ReactT-harmony_hybridTarget - 编译到 Harmony (Hybird 模式)Target - 编译到 Harmony (Hybird 模式)V-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working
Description
请先确认
- 我已搜索并确定这个提交不是重复的
Taro 版本
v4
相关领域
Webpack loader
使用框架
React
相关平台
- 所有平台
- Web 端(H5)
- 移动端(React-Native)
- 鸿蒙(Harmony)
- 鸿蒙容器(Harmony Hybrid)
- ASCF 元服务
- 快应用(QuickApp)
- 所有小程序
- 微信小程序
- 企业微信小程序
- 京东小程序
- 百度小程序
- 支付宝小程序
- 支付宝 IOT 小程序
- 头条小程序
- QQ 小程序
- 钉钉小程序
- 飞书小程序
- 快手小程序
小程序基础库版本
No response
问题描述
在Taro项目编译到 harmony-hybrid容器中,使用Taro的 useDidShow等 hook报错, 提示is not a function;
复现链接
复现步骤
- taro init 下载react & webpack 模板项目
- 使用 harmony-hybrid 配置,启动鸿蒙项目, 通过web-container,设置url为本地url
- 访问时会报错(0 ,tarojs_taro_WEBPACK_IMPORTED_MODULE_1.useRouter) is not a function
环境信息
Taro CLI 4.1.3 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\Users\12464\AppData\Local\pnpm\yarn.CMD
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 4.1.3 => 4.1.3
@tarojs/components: 4.1.3 => 4.1.3
@tarojs/helper: 4.1.3 => 4.1.3
@tarojs/plugin-framework-react: 4.1.3 => 4.1.3
@tarojs/plugin-html: ^4.1.3 => 4.1.8
@tarojs/plugin-platform-alipay: 4.1.3 => 4.1.3
@tarojs/plugin-platform-h5: 4.1.3 => 4.1.3
@tarojs/plugin-platform-harmony-hybrid: 4.1.3 => 4.1.3
@tarojs/plugin-platform-jd: 4.1.3 => 4.1.3
@tarojs/plugin-platform-qq: 4.1.3 => 4.1.3
@tarojs/plugin-platform-swan: 4.1.3 => 4.1.3
@tarojs/plugin-platform-tt: 4.1.3 => 4.1.3
@tarojs/plugin-platform-weapp: 4.1.3 => 4.1.3
@tarojs/react: 4.1.3 => 4.1.3
@tarojs/runtime: 4.1.3 => 4.1.3
@tarojs/shared: 4.1.3 => 4.1.3
@tarojs/taro: 4.1.3 => 4.1.3
@tarojs/taro-loader: 4.1.3 => 4.1.3
@tarojs/vite-runner: 4.1.3 => 4.1.3
@tarojs/webpack5-runner: 4.1.3 => 4.1.3
babel-preset-taro: 4.1.3 => 4.1.3
eslint-config-taro: 4.1.3 => 4.1.3
react: ^18.0.0 => 18.3.1
taro-ui: ^3.3.0 => 3.3.0开源贡献
- 我愿意修复这个错误。请参考 (贡献指南)
Metadata
Metadata
Assignees
Labels
A-loaderArea - Webpack loader 相关Area - Webpack loader 相关F-reactFramework - ReactFramework - ReactT-harmony_hybridTarget - 编译到 Harmony (Hybird 模式)Target - 编译到 Harmony (Hybird 模式)V-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working