Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
4.0.9没有问题,升级到4.0.10后出现问题,仅h5有问题,微信小程序没有问题!
多次尝试退回到4.0.9没问题,升级到4.0.10就出问题。
尝试过删除node_modules也没用。
本来提交issue的,结果填写好了,点击提交,闪一下就没了,故在这里反馈!
复现仓库
https://github.com/clayzx/taro-test.git
重现步骤
通过 taro init test 初始化一个新工程:
? 请输入项目介绍 test
? 请选择框架 React
? 是否需要使用 TypeScript ? Yes
? 是否需要编译为 ES5 ? Yes
? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass
? 请选择包管理工具 yarn
? 请选择编译工具 Webpack5
确保package.json中taro所有版本为4.0.10
在src/pages/index/index.ts中添加代码:
import Taro from '@tarojs/taro'
console.warn(Taro.getSystemInfoSync());
console.warn(Taro.getWindowInfo());
console.warn(Taro.getStorageSync('x'));
运行:yarn dev:h5, 报错:
tarojs_taro__WEBPACK_IMPORTED_MODULE_2_.default.getSystemInfoSync is not a function
浏览器版本
Edge 135.0.3179.66
期望的结果是什么?
能正常运行!
实际的结果是什么?
所有taro-h5中的接口都提示:is not a function
环境信息
Taro CLI 4.0.10 environment info:
System:
OS: Windows 11 10.0.26100
Binaries:
Node: 18.20.1 - ~\AppData\Local\Temp\yarn--1744404152322-0.579426020467187\node.CMD
Yarn: 1.22.22 - ~\AppData\Local\Temp\yarn--1744404152322-0.579426020467187\yarn.CMD
npm: 10.5.0 - D:\Development\nvm\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 4.0.10 => 4.0.10
@tarojs/components: 4.0.10 => 4.0.10
@tarojs/helper: 4.0.10 => 4.0.10
@tarojs/plugin-framework-react: 4.0.10 => 4.0.10
@tarojs/plugin-platform-alipay: 4.0.10 => 4.0.10
@tarojs/plugin-platform-h5: 4.0.10 => 4.0.10
@tarojs/plugin-platform-harmony-hybrid: 4.0.10 => 4.0.10
@tarojs/plugin-platform-jd: 4.0.10 => 4.0.10
@tarojs/plugin-platform-qq: 4.0.10 => 4.0.10
@tarojs/plugin-platform-swan: 4.0.10 => 4.0.10
@tarojs/plugin-platform-tt: 4.0.10 => 4.0.10
@tarojs/plugin-platform-weapp: 4.0.10 => 4.0.10
@tarojs/react: 4.0.10 => 4.0.10
@tarojs/runtime: 4.0.10 => 4.0.10
@tarojs/shared: 4.0.10 => 4.0.10
@tarojs/taro: 4.0.10 => 4.0.10
@tarojs/taro-loader: 4.0.10 => 4.0.10
@tarojs/webpack5-runner: 4.0.10 => 4.0.10
babel-preset-taro: 4.0.10 => 4.0.10
eslint-config-taro: 4.0.10 => 4.0.10
react: ^18.0.0 => 18.3.1
Beta Was this translation helpful? Give feedback.
All reactions