-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Loader error on data request proxying raw fetch response #9691
Comments
This isn't actually related to the ENV variable but looks like a stricter implementation of immutable It looks like it's limited to directly returned For now, the best workaround is probably to read the response and return your own json response: const res = await fetch(...);
const data = await res.json();
return json(data); |
Thanks for digging in, @brophdawg11. I was intentionally returning the |
Yeah for sure - that will still be the recommendation in this type of BFF setup. It looks like |
Resolved by #9693 and will be available in the next release |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Works like a charm! Thank you for a quick turnaround on this 🙏 |
Reproduction
https://github.com/nareshbhatia/remix-nested-layouts
Movies
tab. App navigates to http://localhost:3000/movies. However it crashes with error:TypeError: immutable
.This indicates that the loader is reading the
API_URL
environment variable correctly for full page render, however when navigating from page to page, it can't read the environment variable.This problem does not exist in production mode. See prod deployment at https://remix-nested-layouts-coral.vercel.app/
System Info
Used Package Manager
npm
Expected Behavior
I should be able to navigate to any page, or click on various movies in the movie list and the app should not crash (in dev mode). The basic issue is that environment variables are not being read when navigating from page to page.
Actual Behavior
App crashes when navigating from page to page.
The text was updated successfully, but these errors were encountered: