node-downloader-helper icon indicating copy to clipboard operation
node-downloader-helper copied to clipboard

TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:" with node-downloader-helper

Open vamsideepak opened this issue 1 year ago • 1 comments

Getting the below issue when I am trying to download files using node-downloader-helper I am using node 16.16.0 and 18.14.0 by using nvm and also tried by downloading the node manually instead of nvm still no luck. my npm version 8.3.0, node-downloader-helper versions tried 1.0.13 and 2.1.4.

TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
    at new NodeError (node:internal/errors:399:5)
    at new ClientRequest (node:_http_client:189:11)
    at Object.request (node:http:98:10)
    at b.d 
    
    (C:\Users\XXXX\Desktop\MockServer\Trilogy_Client_Installer\workers\node_modules\node-downloader-helper\dist\index.js:1:6742)
    at b.a (C:\Users\XXXX\Desktop\MockServer\Trilogy_Client_Installer\workers\node_modules\node-downloader-helper\dist\index.js:1:6164)

vamsideepak avatar Jul 20 '23 06:07 vamsideepak

Hello @vamsideepak could you tried the latest version 2.1.8 and let me know?

if the latest version is not fixed, would be possible to you to share the URL that is causing this issue? it seems to me that you are using a http url, but is been redirected to https, if that the case, you could try just use https from the beginning, although every time a redirect is happening, we restart the protocol so it should covers this cases

hgouveia avatar Jul 20 '23 06:07 hgouveia