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.getStorageSync is not a function #16555

Open
unclekitty opened this issue Sep 19, 2024 · 2 comments
Open

Taro.getStorageSync is not a function #16555

unclekitty opened this issue Sep 19, 2024 · 2 comments
Labels
F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-4 Version - 4.x

Comments

@unclekitty
Copy link

相关平台

H5

浏览器版本: Chrome 128.0.6613.138
使用框架: Vue 3

复现步骤

<script setup> import Taro from "@tarojs/taro"; Taro.getStorageSync("222222222222"); </script>

期望结果

期望正常运行

实际结果

An error occurred: Uncaught TypeError: Taro.getStorageSync is not a function at

环境信息

Taro CLI 4.0.5 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
      npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.5 => 4.0.5
      @tarojs/components: 4.0.5 => 4.0.5
      @tarojs/helper: 4.0.5 => 4.0.5
      @tarojs/plugin-framework-vue3: 4.0.5 => 4.0.5
      @tarojs/plugin-html: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-h5: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-jd: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-qq: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-swan: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-tt: 4.0.5 => 4.0.5
      @tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5
      @tarojs/runtime: 4.0.5 => 4.0.5
      @tarojs/shared: 4.0.5 => 4.0.5
      @tarojs/taro: 4.0.5 => 4.0.5
      @tarojs/vite-runner: 4.0.5 => 4.0.5
      @tarojs/webpack5-runner: 4.0.5 => 4.0.5
      babel-preset-taro: 4.0.5 => 4.0.5
      eslint-config-taro: 4.0.5 => 4.0.5
@TheKonka
Copy link
Member

import { getStorageSync } from '@tarojs/taro'

先这样写吧

@TheKonka TheKonka added F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-4 Version - 4.x labels Sep 19, 2024
@unclekitty
Copy link
Author

import { getStorageSync } from '@tarojs/taro'

先这样写吧

最近安排一个版本吗?4.0.5 问题有点多啊,项目代码太多又不好一处处改,只好等待升级

This was referenced Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-4 Version - 4.x
Projects
Status: Padding
Development

No branches or pull requests

2 participants