npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

[Error: Invalid protocol: null] in http request

In my project I tried to update mongoose.
I directly change my mongoose version in package.json.
And run npm install.
I got the result some package updated and some packages removeed.
Now I tried to run my project.
In my project I’m using npm request to make API calls.
While making a request , it’s show an error
Protocol undefined null.

How to fix this issue.

, function(err, res, body){
    if(err == null){

request is not by npm, it’s only distributed on the npm registry (together with almost a million other packages). Topics in #support and #bugs should be about npm itself: the registry, the website, and mainly the CLI. Since this error doesn’t seem to be caused by any of those, I moved it to #community:javascript for you.