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
The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose
Error: Expected a Response to be returned from resource route handler
at invariant3 (C:\projects\_pewvegas\pm-travels-and-tours-website\node_modules\react-router\dist\production\index.js:8684:11)
at handleResourceRequest (C:\projects\_pewvegas\pm-travels-and-tours-website\node_modules\react-router\dist\production\index.js:9420:5)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at requestHandler (C:\projects\_pewvegas\pm-travels-and-tours-website\node_modules\react-router\dist\production\index.js:9206:18)
at nodeHandler (C:\projects\_pewvegas\pm-travels-and-tours-website\node_modules\@react-router\dev\dist\vite.js:1967:30)
at C:\projects\_pewvegas\pm-travels-and-tours-website\node_modules\@react-router\dev\dist\vite.js:1973:17
The text was updated successfully, but these errors were encountered:
Try to return Response.json({ username: "username", email: "email" })
While in UI routes you can return naked objects, in API routes you need to return a response, I recommend you to always return responses for consistency.
I'm using React Router as a...
framework
Reproduction
I did this in routes.ts
System Info
Used Package Manager
npm
Expected Behavior
To return json response
Actual Behavior
The text was updated successfully, but these errors were encountered: