You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My guess is you probably have a package that is meant for web. You could polyfill it, but I wouldn't do that. Look at what packages you've installed recently or using. You might have to configure a driver for storage using async storage or something.
Description
while running the app it throws
[ReferenceError: Can't find variable: localStorage]
Version
"react-native": "0.66.4",
Output of
npx react-native info
System:
OS: macOS 13.1
CPU: (8) arm64 Apple M1
Memory: 75.59 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.5.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.3.1 - /opt/homebrew/bin/npm
Watchman: 2023.01.23.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 23, 29, 30, 31, 32, 33
Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0
System Images: android-29 | Google Play ARM 64 v8a, android-30 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.4 => 0.66.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
eveytime when i call API and store it in context it throws
[ReferenceError: Can't find variable: localStorage]
Snack, code example, screenshot, or link to a repository
not sure what code affecting this because
localStorage
is nowhere added in codeThe text was updated successfully, but these errors were encountered: