Preliminary Checks
Reproduction
none
Publishable key
none
Description
Steps to reproduce:
import{Platform}from"react-native";import*asSecureStorefrom"expo-secure-store";import{TokenCache}from"@clerk/clerk-expo/dist/cache";constcreateTokenCache=(): TokenCache=>{return{getToken: async(key: string)=>{try{constitem=awaitSecureStore.getItemAsync(key);if(item){console.log(`${key} was used 🔐 \n`);}else{console.log("No values stored under key: "+key);}returnitem;}catch(error){console.error("secure store get item error: ",error);awaitSecureStore.deleteItemAsync(key);returnnull;}},saveToken: (key: string,token: string)=>{returnSecureStore.setItemAsync(key,token);},};};// SecureStore is not supported on the webexportconsttokenCache=Platform.OS!=="web" ? createTokenCache() : undefined;this cache.ts will throw error because in package.json of expo package it's not officially exported, in some safe behavior like my pnpm projects, it will not properly link.
Expected behavior:
types working properly
Actual behavior:
Cannot find module '@clerk/clerk-expo/dist/cache' or its corresponding type declarations. ts (2307)
Suggested Solution
add cache to the library supported export
Environment
System:
OS: macOS 14.7.1
CPU: (11) arm64 Apple M3 Pro
Memory: 102.00 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.13.0 - ~/.asdf/installs/nodejs/22.13.0/bin/node
npm: 10.9.2 - ~/.asdf/plugins/nodejs/shims/npm
pnpm: 8.15.8 - ~/.asdf/installs/pnpm/8.15.8/bin/pnpm
Watchman: 2025.02.17.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 134.0.6998.45
Safari: 17.6
npmPackages:
@dietthing/eslint-config: workspace:* => 0.3.0 @dietthing/prettier-config: workspace:* => 0.1.0 @dietthing/tailwind-config: workspace:* => 0.1.0 @dietthing/tsconfig: workspace:* => 0.0.1 react-native-tab-view: ^3.5.2 => 3.5.2
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
none
Publishable key
none
Description
Steps to reproduce:
this cache.ts will throw error because in package.json of expo package it's not officially exported, in some safe behavior like my pnpm projects, it will not properly link.
Expected behavior:
types working properly
Actual behavior:
Suggested Solution
add cache to the library supported export
Environment