Skip to content
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

How to use this SDK in browser? #3

Open
aztack opened this issue May 6, 2023 · 1 comment
Open

How to use this SDK in browser? #3

aztack opened this issue May 6, 2023 · 1 comment

Comments

@aztack
Copy link

aztack commented May 6, 2023

I got an error that said dotenv using process.cwd which does not exist in the browser environment.
Is there a way to configure dotenv to avoid using node-related APIs to make this SDK work in the browser?
Or, maybe you can remove dotenv and use vite.js with:

  define: {
    // other defines read from .env file
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || "production"),
  }
@aztack aztack changed the title How to use in browser? How to use this SDK in browser? May 6, 2023
@KindaSloth
Copy link
Collaborator

KindaSloth commented May 9, 2023

Sorry for the delay, I just noticed the issue now, could you send the error here and how I can reproduce it? so I can solve the problem, also I changed dotenv to development dependency in the last release, since it is not a necessary dependency outside the dev environment, can you try to reproduce the error with the last version of the SDK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants