tamagui: Bumping from 1.115.5 to 1.116.* causes @tamagui/use-did-finish-ssr to no longer resolve
Current Behavior
Bumping past version 1.115.5 causes the use-did-finish-ssr module to no longer resolve. When adding the dependency manually, after app bootup I get the following: TypeError: Cannot read property 'useState' of null
Expected Behavior
Upgrade the package version and it works as expected, or the module is added manually into package.json and the useState error does not occur.
Tamagui Version
1.116.0
Platform (Web, iOS, Android)
iOS, Android with Expo
Reproduction
I'm unable to reproduce on a starter repo but this is happening with both of the existing Tamagui/Expo codebases I'm working on.
The "unable to resolve" issue comes from `@tamagui/sheet/dist/cjs/createSheet.native.js` where `use-did-finish-ssr` is a dependency
The useState error after including it as a dependency is as follows:
TypeError: Cannot read property 'useState' of null
This error is located at:
in UnmountedClassName
in TamaguiProvider
in TamaguiProvider
in QueryClientProvider
in SWRConfig
in OrganizationProvider
in ClerkContextProvider
System Info
> envinfo --system --npmPackages --binaries --browsers
System:
OS: macOS 14.7
CPU: (10) arm64 Apple M1 Pro
Memory: 620.16 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 21.6.1 - ~/.nvm/versions/node/v21.6.1/bin/node
Yarn: 4.0.2 - ~/.nvm/versions/node/v21.6.1/bin/yarn
npm: 8.19.4 - ~/Documents/github/selflogistics/packmule-mobile/node_modules/.bin/npm
bun: 1.1.20 - ~/.bun/bin/bun
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 130.0.6723.70
Safari: 18.0
npmPackages:
@babel/core: ^7.25.2 => 7.25.2
@google/semantic-release-replace-plugin: 1.1.0 => 1.1.0
@graphql-codegen/cli: ^5.0.2 => 5.0.2
@graphql-codegen/introspection: ^4.0.3 => 4.0.3
@graphql-codegen/typescript-operations: ^4.2.3 => 4.2.3
@graphql-codegen/typescript-react-query: ^6.1.0 => 6.1.0
@manypkg/cli: ^0.21.4 => 0.21.4
@semantic-release/changelog: 6.0.1 => 6.0.1
@semantic-release/git: 10.0.1 => 10.0.1
@semantic-release/github: 8.0.6 => 8.0.6
@semantic-release/npm: 9.0.1 => 9.0.1
@semantic-release/release-notes-generator: 10.0.3 => 10.0.3
@sentry/react-native: ~5.24.3 => 5.24.3
@tamagui/animations-react-native: 1.116.0 => 1.116.0
@tamagui/babel-plugin: 1.116.0 => 1.116.0
@tamagui/config: 1.116.0 => 1.116.0
@tamagui/font-inter: 1.116.0 => 1.116.0
@tamagui/lucide-icons: 1.116.0 => 1.116.0
@tamagui/portal: 1.116.0 => 1.116.0
@tamagui/themes: 1.116.0 => 1.116.0
@tamagui/toast: 1.116.0 => 1.116.0
@tanstack/react-query: ^5.55.2 => 5.55.2
@types/react: ~18.2.79 => 18.2.79
@typescript-eslint/eslint-plugin: ^8.4.0 => 8.4.0
@typescript-eslint/parser: ^8.4.0 => 8.4.0
babel-plugin-module-resolver: ^5.0.2 => 5.0.2
babel-plugin-transform-inline-environment-variables: ^0.4.4 => 0.4.4
burnt: ^0.12.2 => 0.12.2
conventional-changelog-conventionalcommits: ^8.0.0 => 8.0.0
eslint: ^9.10.0 => 9.10.0
eslint-config-prettier: ^9.1.0 => 9.1.0
eslint-plugin-prettier: ^5.2.1 => 5.2.1
eslint-plugin-react: ^7.35.2 => 7.35.2
eslint-plugin-simple-import-sort: ^12.1.1 => 12.1.1
expo: ~51.0.38 => 51.0.38
expo-build-properties: ~0.12.5 => 0.12.5
expo-camera: ~15.0.16 => 15.0.16
expo-constants: ~16.0.2 => 16.0.2
expo-doctor: ^1.10.1 => 1.10.1
expo-font: ~12.0.10 => 12.0.10
expo-haptics: ~13.0.1 => 13.0.1
expo-linear-gradient: ~13.0.2 => 13.0.2
expo-linking: ~6.3.1 => 6.3.1
expo-router: ~3.5.23 => 3.5.23
expo-secure-store: ~13.0.2 => 13.0.2
expo-splash-screen: ~0.27.6 => 0.27.6
expo-status-bar: ~1.12.1 => 1.12.1
expo-system-ui: ~3.0.7 => 3.0.7
expo-updates: ~0.25.27 => 0.25.27
graphql: ^16.8.2 => 16.9.0
prettier: ^3.3.3 => 3.3.3
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.5 => 0.74.5
react-native-gesture-handler: ~2.16.1 => 2.16.2
react-native-reanimated: ~3.10.1 => 3.10.1
react-native-safe-area-context: 4.10.5 => 4.10.5
react-native-screens: 3.31.1 => 3.31.1
react-native-svg: 15.2.0 => 15.2.0
react-native-svg-transformer: ^1.5.0 => 1.5.0
semantic-release: 19.0.5 => 19.0.5
tamagui: 1.116.0 => 1.116.0
typescript: ~5.3.3 => 5.3.3
zod: ^3.23.8 => 3.23.8
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 14
- Comments: 18 (13 by maintainers)
Same here with expo 52 & next inside a bun monorepo. It’s using tamagui 1.116. I need to try later with React 18.3.1 and not React 18.2.0
update : working with React 18.3.1.
Using pnpm with expo 51. Still getting the same error. Im using the packages as downgraded by expo-doctor to the supported expo 51 versions. Delete pnpm-lock.yaml and regenerated. Same issue…
in my package.json i upgraded react and react dom to 18.3.1 and forced expo-doctor to leave it alone
Which bumped react and react-dom to 18.3.1 and can confirm I no longer get the tamagui issue.
Release going out - I’m giving up on react versioning, even in local testing it’s hard for me to get yarn to behave even if I removed the react and react-dom entirely from the package.json and cleared yarn.lock. I think it’s relatively safe to just have it
*anyway, and not worth all the effort of me trying to figure out what’s going on here.