You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're importing requireNodeEnvVar into the payment/plans.ts and then some of these variables are being imported onto the client, causing clientside errors if the user extends the utils.ts file with a serverside only function.
Fixeswasp-lang#370
Organize `server/utils.ts` functions to avoid client-side imports.
* Add `template/app/src/server/envUtils.ts` to contain the `requireNodeEnvVar` function.
* Remove `requireNodeEnvVar` function from `template/app/src/server/utils.ts`.
* Update imports of `requireNodeEnvVar` in `template/app/src/payment/plans.ts`, `template/app/src/payment/lemonSqueezy/paymentProcessor.ts`, `template/app/src/payment/stripe/paymentProcessor.ts`, `template/app/src/payment/stripe/stripeClient.ts`, `template/app/src/payment/lemonSqueezy/webhook.ts`, and `template/app/src/payment/stripe/webhook.ts` to import from `template/app/src/server/envUtils.ts`.
We're importing
requireNodeEnvVar
into thepayment/plans.ts
and then some of these variables are being imported onto the client, causing clientside errors if the user extends theutils.ts
file with a serverside only function.See this convo for more info: https://discord.com/channels/686873244791210014/1339549500158771250/1339549500158771250
The text was updated successfully, but these errors were encountered: