Error when evaluating SSR module EVEN WITH ssr: false

I have a SolidStart project with file-based routing and ssr: false I'm using @revenuecat/purchases-capacitor inside of the project. When I use the revenuecat package in a file inside of the routes folder, everything works. Unfortunately, using the revenuecat package outside of the routes folder throws and error: Error when evaluating SSR module /node_modules/@solidjs/start/dist/server/spa/handler.js: failed to import "@revenuecat/purchases-capacitor" I'm guessing that's because SolidStart only considers files inside of the routes folder to be "client side" even if I have ssr: false. Is this a correct assumption? Any clarity would be appreciated. For context, I was trying to use the revenuecat package in an auth-context file that I provide to the app like this:
<Router
root={(props) => (
<MetaProvider>
<SupabaseAuthProvider> // I'M USING THE REVENUECAT PACKAGE HERE
<ThemeProvider>
<DeviceProvider>
<Title>{brandName}</Title>
<PostHogPageView />
<Suspense>{props.children}</Suspense>
</DeviceProvider>
</ThemeProvider>
</SupabaseAuthProvider>
</MetaProvider>
)}
>
<FileRoutes />
</Router>
<Router
root={(props) => (
<MetaProvider>
<SupabaseAuthProvider> // I'M USING THE REVENUECAT PACKAGE HERE
<ThemeProvider>
<DeviceProvider>
<Title>{brandName}</Title>
<PostHogPageView />
<Suspense>{props.children}</Suspense>
</DeviceProvider>
</ThemeProvider>
</SupabaseAuthProvider>
</MetaProvider>
)}
>
<FileRoutes />
</Router>
Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?