question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: req.setNoDelay is not a function

See original GitHub issue

This package is being used as a dependency for Auth0 v9 and it throws a req.setNoDelay is not a function error when calling this method: changePassword

Thanks ✌️

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pieterbeulquecommented, Jan 31, 2018

Hey, I verified & that string is present in the bundle.

It looks like our build tool is using the ./lib/client.js file as an entry point, as it should.

However, the node-superagent string is also present in the same bundle. This is probably where things go wrong?

I took a deep dive in the bundled code and found this:

System.registerDynamic("npm:superagent@3.8.2.js", ["npm:superagent@3.8.2/lib/node/index.js"], true, function ($__require, exports, module) {
  var global = this || self,
      GLOBAL = global;
  module.exports = $__require("npm:superagent@3.8.2/lib/node/index.js");
});

So it’s effectively registering the Node.js entry point as the main entry point, preferring the main keyword from package.json over the browser one.

If I change lib/node/index.js in the part above with lib/client.js, everything works as expected in the browser.

Looks like the JSPM issue tracker is where I’m headed 🤕 I’ll be following it up here: https://github.com/systemjs/systemjs/issues/1792

0reactions
kornelskicommented, Mar 11, 2019

From linked issues it seems this was a bug in jspm, and it has been fixed in jspm 0.17. Make sure you have an up-to-date version of jspm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: req.setNoDelay is not a function · Issue #1331
This package is being used as a dependency for Auth0 v9 and it throws a req.setNoDelay is not a function error when calling...
Read more >
Uncaught TypeError: req.setNoDelay is not a function
Hi, guys I've tried to add Auth0Lock… Only one line of code: this.lock = new Auth0Lock(my_id, my_domain) and got this in console…
Read more >
node.js - Why is socket.setNoDelay() throwing an error?
Because socket isn't a net.Socket , it's a socket.io Socket . You'll notice that there is no setNoDelay method on a socket.io Socket...
Read more >
Node.js http.ClientRequest.setNoDelay() Method
setNoDelay () is an inbuilt application programming interface of class ClientRequest within HTTP module which is used to set the socket such as ......
Read more >
req.flash is not a function" using passport with nodejs ... - Reddit
javascript - "TypeError: req. flash is not a function" using passport with nodejs, username and password auth .. any ideas? : r/node.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found