3.0.0 beta.10: TypeError: Cannot read property 'body' of null
See original GitHub issueimport fetch from 'node-fetch'
const response = await fetch('https://blog.logrocket.com/feed')
const body = await response.text()
console.log(body)
throws
file:///root/fetchbug/node_modules/node-fetch/src/index.js:99
response.body.destroy(error);
^
TypeError: Cannot read property 'body' of null
at file:///root/fetchbug/node_modules/node-fetch/src/index.js:99:13
at TLSSocket.<anonymous> (file:///root/fetchbug/node_modules/node-fetch/src/index.js:310:6)
at TLSSocket.emit (events.js:327:22)
at net.js:673:12
at TCP.done (_tls_wrap.js:563:7)
software | version |
---|---|
node-fetch | 3.0.0-beta.10 |
node | v14.16.0 |
npm | 7.17.0 |
Operating System | archlinux |
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'body' of null - Stack Overflow
To fix this you should use a package that isn't deprecated and make sure you are trying to fetch a resource that you...
Read more >jest typeerror: cannot read properties of null (reading 'usestate')
Invalid hook call. Hooks can only be called inside of the body of a function component. TypeError: Cannot read properties of null (reading...
Read more >Changelog - Cypress Documentation
We fixed a regression in 3.6.0 where Cypress would crash with TypeError: Cannot read property 'length' of null on some network requests. Fixes...
Read more >Cannot read property 'medium' of null" Cant figure it out! - Reddit
I think this means that the data hasn't been loaded yet so to fix this u can add { medium && medium.map.... }....
Read more >How to Build a Full Stack NFT Marketplace - V2 (2022)
Oct 21 '21 • Edited on Mar 10 ... node-fetch <=2.6.0 || 3.0.0-beta.1 - 3.0.0-beta.8 ... TypeError: Cannot read property '2' of undefined....
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
@jimmywarting I’ll take a look at this today.
@jimmywarting See #1222 for fix