-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process
is not defined error for Vite and Workers
#237
Comments
I'm seeing the same error as well with vite + vuejs3. |
Found any solution? |
I am also having the same problem. |
We've been seeing other users having the same issue in other serverless platforms, including Cloudflare Workers.
And Qwik:
|
Can one share an example on how to reproduce this issue? A minimal repository would be helpful if possible 🙏 |
I created a small example of how this error was occurring in my project with vuejs3 + viter: https://github.com/mikessdev/resendViteEnvError I hope it can be useful. |
process
is not defined error for Vite and Workers
This has been fixed on v2.1.0. |
Problem:
My challenge arises from the development environment I am using – Vite with React. Vite doesn't enable the direct use of process.env, which is typically how environment variables are accessed. Instead, it relies on import.meta.env for environment variables.
Error:
While trying to integrate Resend into my Vite React project, I encountered a critical issue. It seems that Resend's dependency files internally use process, which is not recognized within Vite, leading to a "Process is not defined" error. This error effectively blocks the usage of Resend within a Vite project, and as a result, the straightforward integration process becomes problematic.
Request:
I would like to propose an enhancement or modification to the Resend library to ensure its compatibility with Vite React. Specifically, I suggest replacing the usage of process with import.meta.env or making the library Vite-friendly in a way that allows developers to use it seamlessly within Vite projects.
Expected Outcome:
The desired outcome is a Resend library that seamlessly integrates with Vite React projects, removing the "Process is not defined" error and making email sending via Resend as straightforward as intended.
The text was updated successfully, but these errors were encountered: