#Routes not working on server

1 messages · Page 1 of 1 (latest)

opal veldt
#

For some reason these routes do not work on the server but work on localhost. What am I doing wrong?

red escarp
#

I'd attach the server error that get's printed on the server log cause until now we can't really see what's happening (or not happening)

opal veldt
#

Its' adding a data query to the route?

/john-jones/roxanne/095b50e7-8d60-48cf-b6d6-fee1220a534c?_data=routes%2F%24userName%2F%24slug%2F%24mixId

It should be:

/john-jones/roxanne/095b50e7-8d60-48cf-b6d6-fee1220a534c

Any clue why this is happening?

opal veldt
red escarp
#

This doens't look like the actual error description / trace. It just says that it responded with a 500

opal veldt
red escarp
#

I think this is the default behavior of remix. Not what the browser sees, but only what the backend shows / network manager can also show. The route should still be the same since it's only get parameters :/ hmm

opal veldt
opal veldt
# red escarp I think this is the default behavior of remix. Not what the browser sees, but on...

Is this what you were asking for:

2022-10-20T09:32:14.775 app[084d924a] iad [info] Error: Mix not found

2022-10-20T09:32:14.775 app[084d924a] iad [info] at loader3 (/app/build/index.js:2078:11)

2022-10-20T09:32:14.775 app[084d924a] iad [info] at Object.callRouteLoader (/app/node_modules/@remix-run/server-runtime/dist/data.js:77:14)

2022-10-20T09:32:14.775 app[084d924a] iad [info] at handleDataRequest (/app/node_modules/@remix-run/server-runtime/dist/server.js:113:18)

2022-10-20T09:32:14.775 app[084d924a] iad [info] at requestHandler (/app/node_modules/@remix-run/server-runtime/dist/server.js:34:18)

2022-10-20T09:32:14.775 app[084d924a] iad [info] at /app/node_modules/@remix-run/express/dist/server.js:39:22

2022-10-20T09:32:14.777 app[084d924a] iad [info] GET /john-jones/roxanne/095b50e7-8d60-48cf-b6d6-fee1220a534c?_data=routes%2F%24userName%2F%24slug%2F%24mixId 500 - - 23.943 ms

2022-10-20T09:32:17.292 app[084d924a] iad [info] GET /john-jones?_data=routes%2F%24userName%2Findex 200 - - 9.688 ms
red escarp
#

yeah that's the error message we were lookingn for 🙂

Is "Mix not found" something that you wrote somewhere as an error message? Maybe show that part of the code

opal veldt
#

Yes. That's my code.

#

Here's my question. Why do some files have the filename.server.ts extension?

#

Like the way a lot of the files I got from the Remix docs have functions they call from files with the .server extension.

#

Maybe that's the problem?