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
I've changed publicPath in remix.config.js from /build to /cxt/build/ and also serve the Remix App under the context root /cxt/... by a NodeJS Express server. All JS bundles/chunks are loaded correctly from http://localhost:3000/cxt/build/.... However, the Remix App does not work. It seems to be a problem on client side. On the browser console I see this log message:
No routes matched location "/cxt/"
and then there is this error:
react-dom.development.js:67 Warning: Did not expect server HTML to contain a <div> in <body>.
at script
at ScrollRestoration (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:3355:3)
at body
at html
at App
at RemixRoute (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:3021:3)
at Routes (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:3009:7)
at Router2 (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:478:21)
at RemixCatchBoundary (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:1564:10)
at RemixErrorBoundary (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:1489:5)
at RemixEntry (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:2906:12)
at RemixBrowser (http://localhost:3000/cxt/build/_shared/chunk-LAE5MDMM.js:3313:27)
Did I miss something? I'm actually trying to serve various Remix apps under different context roots from the same NodeJS Express server instance but I cannot make it work. Is this currently supported at all?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've changed
publicPath
inremix.config.js
from/build
to/cxt/build/
and also serve the Remix App under the context root/cxt/...
by a NodeJS Express server. All JS bundles/chunks are loaded correctly from http://localhost:3000/cxt/build/.... However, the Remix App does not work. It seems to be a problem on client side. On the browser console I see this log message:No routes matched location "/cxt/"
and then there is this error:
Did I miss something? I'm actually trying to serve various Remix apps under different context roots from the same NodeJS Express server instance but I cannot make it work. Is this currently supported at all?
My complete sample app can be found under https://github.com/fedelman/remix-with-context-root
Beta Was this translation helpful? Give feedback.
All reactions