Error when running on `node v18.1.0` and using SSR
See original GitHub issueI tried checking if someone has already reported this, but I couldn’t find anything, so here I am:
When I have ssr: true
, I’m getting the following error on node v18.1.0
(I switched to an older version and everything works just fine):
TRPCClientError: fetch failed
at Function.from (/home/ddimitrov/Dev/some-project/node_modules/@trpc/client/dist/TRPCClientError-bfee2bf5.cjs.dev.js:69:14)
at /home/ddimitrov/Dev/some-project/node_modules/@trpc/client/links/httpBatchLink/dist/trpc-client-links-httpBatchLink.cjs.dev.js:208:50 {
originalError: TypeError: fetch failed
at Object.processResponse (node:internal/deps/undici/undici:5575:34)
at node:internal/deps/undici/undici:5901:42
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) {
cause: InvalidArgumentError: invalid connection header
at processHeader (node:internal/deps/undici/undici:2050:15)
at new Request (node:internal/deps/undici/undici:1933:13)
at [dispatch] (node:internal/deps/undici/undici:2858:25)
at Client.dispatch (node:internal/deps/undici/undici:399:33)
at [dispatch] (node:internal/deps/undici/undici:618:32)
at Pool.dispatch (node:internal/deps/undici/undici:399:33)
at [dispatch] (node:internal/deps/undici/undici:4159:27)
at Agent2.dispatch (node:internal/deps/undici/undici:399:33)
at node:internal/deps/undici/undici:6276:83
at new Promise (<anonymous>) {
code: 'UND_ERR_INVALID_ARG'
}
},
shape: undefined,
data: undefined,
isDone: false,
[cause]: TypeError: fetch failed
at Object.processResponse (node:internal/deps/undici/undici:5575:34)
at node:internal/deps/undici/undici:5901:42
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) {
cause: InvalidArgumentError: invalid connection header
at processHeader (node:internal/deps/undici/undici:2050:15)
at new Request (node:internal/deps/undici/undici:1933:13)
at [dispatch] (node:internal/deps/undici/undici:2858:25)
at Client.dispatch (node:internal/deps/undici/undici:399:33)
at [dispatch] (node:internal/deps/undici/undici:618:32)
at Pool.dispatch (node:internal/deps/undici/undici:399:33)
at [dispatch] (node:internal/deps/undici/undici:4159:27)
at Agent2.dispatch (node:internal/deps/undici/undici:399:33)
at node:internal/deps/undici/undici:6276:83
at new Promise (<anonymous>) {
code: 'UND_ERR_INVALID_ARG'
}
}
}
I believe this has to do with some changes in the fetch
api (in node).
Let me know, if I can provide more data, or if there is anything I could do to help out on this.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Error when trying to run dev server | React, SSR - Stack Overflow
This trouble from the ts-loader . You can see pull request here. Instead of using ts-loader you should use babel. You need change...
Read more >Error when evaluating SSR module when running SvelteKit ...
when doing an npm run dev -- --open with a fresh SvelteKit project that imports Datepicker and uses the component on /src/routes/index.svelte.
Read more >15 Common Error Codes in Node.js and How to Fix Them
Here are some possible fixes you can try if you run into this problem: Close all instances of your editor before rerunning the...
Read more >How to Fix the Error Error:error:0308010C:digital envelope ...
This method can only create hashes with algorithms that are available and supported by the version of OpenSSL corresponding to the currently ...
Read more >Fullstack TypeScript: Node.js + React SSR | Nils Mehlhorn
In this post I'll show you how to setup a fullstack TypeScript web application project that uses Node.js and React with server-side ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Feel free to reopen if it’s still an issue, closing for now
This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you.