You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Expected a Response to be returned from resource route handler
at invariant3 (/Users/alex/prj/sotochka/sotka-remix/node_modules/react-router/dist/index.js:8684:11)
at handleResourceRequest (/Users/alex/prj/sotochka/sotka-remix/node_modules/react-router/dist/index.js:9419:5)
at requestHandler (/Users/alex/prj/sotochka/sotka-remix/node_modules/react-router/dist/index.js:9205:18)
at nodeHandler (/Users/alex/prj/sotochka/sotka-remix/node_modules/@react-router/dev/dist/vite.js:1688:30)
at /Users/alex/prj/sotochka/sotka-remix/node_modules/@react-router/dev/dist/vite.js:1694:17
The text was updated successfully, but these errors were encountered:
I ran into this as well. In my case, a resource route with a loader only did not return a valid Response. So the error message was helpful. The message that this is a bug in React Router, however, was not – after all it was an issue in my code, not in React Router.
I ran into this same issue and as suggested by @stalexxx, I added the default export and that resolved the issue. I only had an action defined in my resource route.
What version of React Router are you using?
7.0.0.pre.5
Steps to Reproduce
having this code
actual problem goes away when adding default
Expected Behavior
some usefull debug message
Actual Behavior
throwing
The text was updated successfully, but these errors were encountered: