I used superagent in deno project. I wrote import superagent from 'npm:superagent@8.1.2' and await superagent.get('https://www.bing.com') into index.ts, but it threw this error:
TypeError: req.setNoDelay is not a function
at Request.request (.../node_modules/.deno/superagent@8.1.2/node_modules/superagent/lib/node/index.js:767:7)
at Request.end (.../node_modules/.deno/superagent@8.1.2/node_modules/superagent/lib/node/index.js:919:8)
at .../node_modules/.deno/superagent@8.1.2/node_modules/superagent/lib/request-base.js:266:12
at new Promise (<anonymous>)
at RequestBase.then (.../node_modules/.deno/superagent@8.1.2/node_modules/superagent/lib/request-base.js:250:31)
at eventLoopTick (ext:core/01_core.js:178:11)
Checklist
[x] I have searched through GitHub issues for similar issues.
[x] I have completely read through the README and documentation.
[x] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
Describe the bug
Node.js version: 20.9.0
OS version: Ubuntu 22.04.3 LTS
Description:
I used superagent in deno project. I wrote
import superagent from 'npm:superagent@8.1.2'
andawait superagent.get('https://www.bing.com')
intoindex.ts
, but it threw this error:Checklist