-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
TypeError: headers.get is not a function (vite / nightly) #7819
Comments
This might be due to inconsistent Adding this logging to the reprodcution, this is observed: export default async function handleRequest(
request: Request,
...
) {
console.log("### Request", Request, request.constructor);
console.log("### request instanceof Request = ", request instanceof Request)
// ### Request [class Request extends Body] [class NodeRequest extends Request]
// ### request instanceof Request = false It seems vite node adapter polyfills remix/packages/remix-dev/vite/node/adapter.ts Lines 8 to 12 in 33c64cb
Obviously this cannot be the right solution, but adding this at least makes request get through without error... export default async function handleRequest(
request: Request,
...
) {
(globalThis as any).Request = request.constructor |
Thanks for raising this issue! This should be fixed by #8062. It will be available in the next nightly release. If you could try it and report back, that would be super helpful! |
What version of Remix are you using?
0.0.0-nightly-0c99349-20231027
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
I annotated it at the top of the repo's readme but it uses @PhilDL fork of @sergiodxa's remix-i18next to address ESM issues. sergiodxa/remix-i18next#155
npm i
npm run dev
and receive the errorExpected Behavior
The route to load.
Actual Behavior
The text was updated successfully, but these errors were encountered: