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

Uncaught ReferenceError: process is not defined #195

Closed
tianyu94 opened this issue Jun 12, 2021 · 6 comments
Closed

Uncaught ReferenceError: process is not defined #195

tianyu94 opened this issue Jun 12, 2021 · 6 comments
Labels
question Further information is requested

Comments

@tianyu94
Copy link

with vite.js

Screenshot_20210612_113255

Screenshot_20210612_113317

@avkonst
Copy link
Owner

avkonst commented Jun 13, 2021

I have not idea what vite.js is but I have found the issue on their side: vitejs/vite#1973

@avkonst
Copy link
Owner

avkonst commented Jun 13, 2021

It is a configuration issue for your app bundler.

@avkonst avkonst added the question Further information is requested label Jun 13, 2021
@avkonst
Copy link
Owner

avkonst commented Jun 13, 2021

Also see this solution for Vite: #118 (comment)

@avkonst avkonst closed this as completed Jun 13, 2021
@avkonst
Copy link
Owner

avkonst commented Jun 13, 2021

See #193

@avkonst
Copy link
Owner

avkonst commented Jul 5, 2021

#207

@zgandrew
Copy link

It looks like there need to add file env.d.ts with such entire:
/// <reference types="vite/client" />

Then use import.meta.env.VITE_APP_[VAR_NAME] instead of process.env.VITE_APP_[VAR_NAME]

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

No branches or pull requests

3 participants