mootshrooms
TTCTheo's Typesafe Cult
•Created by mootshrooms on 7/1/2023 in #questions
Conditionally excluding module from bundle
I am making a project using the same react native code base for both a mobile and web application. Stripe's react native SDK does not work on web at the moment. Does anyone know of a way to exclude that module when running on web using preferably the metro bundler? If you do not know of a way with the metro bundler do you know how to do this with alternatives?
3 replies
TTCTheo's Typesafe Cult
•Created by mootshrooms on 6/25/2023 in #questions
Error importing @planetscale/database
I am trying to setup my drizzle orm, but I am having an issue with the "@planetscale/database" module. Heres the error message:
This happens when I run the following in my vercel serverless function
in both production and dev mode:
Following the setups outlined here: https://orm.drizzle.team/docs/installation-and-db-connection/mysql/planetscale
I tried to switch the import to a dynamic one but had issues related to importing in other modules as I had to then change my tsconfig settings.
Here is a stack overflow post by another person describing the same issue in nearly the same way: https://stackoverflow.com/questions/76424056/planetscale-database-produces-an-error-with-drizzle-in-hapi-with-ts-node-in
Please help I have spent a few hours looking for solutions and have no idea how to fix it. Also if anyone has any reading recommendations on the intricacies on nodes module system please let me know!
2 replies