-
Notifications
You must be signed in to change notification settings - Fork 8
Netlify function running locally but not in production #2
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
Comments
Found the problem - looks like the Nuxt Axios needs an additional environment variable: From axios.nuxtjs.org/baseurl -
You can set it on Netlify on the following page: Just make sure you set the value to where your site is hosted. The |
Alternatively it looks like you can set that value to |
@zachheine Pull the latest changes from In
|
Hmm. Didn't seem to work. Could the proxy be affecting it? |
Actually seems to work when I hit the lambdas route so might be an issue in my code... |
Post the snippet here, I'd like to take a look! |
In the component:
In the store:
|
I don't think the fetch() method works on the client side. I refactored to use the created() method and it is more or less working now. So those changes you proposed seem to be working. |
AH - so what's happening here is that this app is deployed as a static site, so there's no server-side rendering - thus no |
Yes, |
@zachheine Opened #3 :) |
Seems like a setting in the "axios" or "proxy" configuration, but I'm not sure which or what.
The text was updated successfully, but these errors were encountered: