For Workes & Pages, what is the name of the domain?
preview.psypony.pages.dev
What is the error number?
none
What is the error message?
no error message.
What is the issue or error you’re encountering
Cannot read preview’s environment variable in pages. always returned production’s environment values.
What steps have you taken to resolve the issue?
I have no solutions.
What are the steps to reproduce the issue?
visit our pages.
Screenshot of the error
I’m developing with react.js and using vite.
alert(‘VITE_NODE_ENV:’ + import.meta.env.VITE_NODE_ENV);
When I run the code, the environment variable values set in preview are not displayed, but the environment variable values set in production are displayed.
solved. my mistake at vite build.
system
Closed
September 8, 2024, 1:07pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.