-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Web build fails with expo-notifications. (localStorage is not defined) #23895
Comments
I'm also experiencing this issue. |
Also experienced this issue. It appears expo-router is rendering the page using nodejs, which does not have access to the localStorage instance in the browser that is being used in the expo-notifications module. this is an annoying incompatibility between the two libraries, but expo documents that they do not support using the expo-notifications module for web applications. A temporary fix I'm using is to use the "platform specific extensions" feature documented here: https://docs.expo.dev/router/advanced/platform-specific-modules/#platform-specific-extensions I have a single module called |
Sick, thank you for the suggested temporary fix! |
# Why - fix #23895 --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Summary
Hello.
I cant build my app after install expo-notifications and use it.
It is a bug or my mistake?
What platform(s) does this occur on?
Web
SDK Version
create-expo-app v2.0.3
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.22621
Binaries:
Node: 16.18.1 - C:\Program Files\nodejs\node.EXE
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ~49.0.5 => 49.0.6
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.3 => 0.72.3
react-native-web: ~0.19.6 => 0.19.7
Expo Workflow: managed
Minimal reproducible example
console
code
app/(tabs)/two.tsx
console
error in console
The text was updated successfully, but these errors were encountered: