environment variables are undefined in production #801
Unanswered
sheheryar-pirzada
asked this question in
Q&A
Replies: 2 comments
-
Your question is more related to Following their documentation should answer your question. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I meet the same question in nextjs. Do you konw how to resolve it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to set the target key in HPM through an env variable which I have in
.env.production
.However, I get this error:
throw new Error(errors_1.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING);
Error: [HPM] Missing "target" option. Example: {target: "http://www.example.org"}
The env variable is undefined for some reason.
Anyone know what the issue might be?
app.use('/api', createProxyMiddleware({ target: process.env.REACT_APP_API_URL, changeOrigin: true }));
Beta Was this translation helpful? Give feedback.
All reactions