lundi 30 mars 2015

Error: Invalid protocol

I am facing this issue while making a request to any url using NodeJS. FYR i have made a script in nodejs which is using request module that calls a page and then scrap that html page but the issue is when it calls i gets an error "Error: Invalid protocol: 10.112.62.78".


My .npmrc file contains following lines



proxy=http://ift.tt/1yhE1n2
https-proxy=http://ift.tt/1yhE1n2
registry=http://ift.tt/N08peU


and i still get following error



[Error: Invalid protocol: 10.112.62.78:]


I have tried all possible combinations of following



http://user:password@proxy:port
http://"user:password"@proxy:port


For the above two i get "URI Malformed error"


Still no solution http://proxy.company.com:port


FYI Versions are as follows:



>node -v
>v0.12.0
>npm -v
>2.5.1


There is one more info i have static ip of 10.112.111.86 in IPv4 and ip of 10.112.62.78 with 8080 in Proxy Setting of Browser . Also i am using Windows 7 desktop and i tried with Proxy IP of 10.112.62.78 & without it but no solution however i can't change the IPv4 otherwise my internet connection would be gone. Please provide some solution i am stuck.


PS: Also tried by changing http To https for https-proxy .


Aucun commentaire:

Enregistrer un commentaire