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

nut getSystemInfoSync 不存在 #16816

Open
Ocyss opened this issue Nov 6, 2024 · 1 comment
Open

nut getSystemInfoSync 不存在 #16816

Ocyss opened this issue Nov 6, 2024 · 1 comment

Comments

@Ocyss
Copy link

Ocyss commented Nov 6, 2024

相关平台

H5

浏览器版本: Microsoft Edge 版本 130.0.2849.68 (正式版本) (arm64)
使用框架: Vue 3

复现步骤

在 H5 端, 4.0.6, 4.0.7 官方模板均能复现, 添加`nut-circle-progress组件即可复现

<template>
  <view class="index">
    <nut-button type="primary" @click="onClick">按钮</nut-button>
    <nut-toast v-model:visible="show" msg="你成功了" />
    <nut-circle-progress :progress="50" color="skyblue" />
  </view>
</template>

期望结果

getSystemInfoSync 正常使用

实际结果

getSystemInfoSync 不存在

Uncaught (in promise) TypeError: taro.getSystemInfoSync is not a function
    at setup (CircleProgress.js:39:24)
    at callWithErrorHandling (runtime-core.esm-bundler.js:199:19)
    at setupStatefulComponent (runtime-core.esm-bundler.js:7870:25)
    at setupComponent (runtime-core.esm-bundler.js:7831:36)
    at mountComponent (runtime-core.esm-bundler.js:5179:7)
    at processComponent (runtime-core.esm-bundler.js:5145:9)
    at patch (runtime-core.esm-bundler.js:4663:11)
    at mountChildren (runtime-core.esm-bundler.js:4895:7)
    at mountElement (runtime-core.esm-bundler.js:4818:7)
    at processElement (runtime-core.esm-bundler.js:4783:7)

环境信息

👽 Taro v4.0.7

(node:27760) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

  Taro CLI 4.0.7 environment info:
    System:
      OS: macOS 12.7.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 22.4.0 - /opt/homebrew/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 10.8.1 - /opt/homebrew/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.7 => 4.0.7 
      @tarojs/components: 4.0.7 => 4.0.7 
      @tarojs/helper: 4.0.7 => 4.0.7 
      @tarojs/plugin-framework-vue3: 4.0.7 => 4.0.7 
      @tarojs/plugin-html: ^4.0.7 => 4.0.7 
      @tarojs/plugin-mini-ci: ^4.0.7 => 4.0.7 
      @tarojs/plugin-platform-alipay: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-h5: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-jd: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-qq: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-swan: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-tt: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-weapp: 4.0.7 => 4.0.7 
      @tarojs/plugin-vue-devtools: ^4.0.7 => 4.0.7 
      @tarojs/runtime: 4.0.7 => 4.0.7 
      @tarojs/service: 4.0.7 => 4.0.7 
      @tarojs/shared: 4.0.7 => 4.0.7 
      @tarojs/taro: 4.0.7 => 4.0.7 
      @tarojs/vite-runner: 4.0.7 => 4.0.7 
      babel-preset-taro: 4.0.7 => 4.0.7 
      eslint-config-taro: 4.0.7 => 4.0.7
@TheKonka
Copy link
Member

TheKonka commented Nov 8, 2024

import { getSystemInfoSync } from '@tarojs/taro'
先这样写吧

This was referenced Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants