Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVALID PROTOCOL: When we try to install #591

Open
Alexis01 opened this issue Mar 24, 2022 · 0 comments
Open

INVALID PROTOCOL: When we try to install #591

Alexis01 opened this issue Mar 24, 2022 · 0 comments

Comments

@Alexis01
Copy link

Hi 馃憢 , Serverless Framework core team here!

We have a yeoman generator and when why try to execute the following command we got an error

npm i serverless-express serverless-azure-functions

The stacktrace is

npm ERR! path /mnt/c/tmp/serverless-azure/node_modules/azure-functions-core-tools
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! attempting to GET "https://functionscdn.azureedge.net/public/3.0.3904/Azure.Functions.Cli.linux-x64.3.0.3904.zip"
npm ERR! using proxy server "http://xxx.xxx.xxx.xxx:xx/"
npm ERR! node:_http_client:158
npm ERR!     throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol);
npm ERR!     ^
npm ERR!
npm ERR! TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
npm ERR!     at new NodeError (node:internal/errors:371:5)
npm ERR!     at new ClientRequest (node:_http_client:158:11)
npm ERR!     at request (node:https:353:10)
npm ERR!     at Object.get (node:https:387:15)
npm ERR!     at Object.<anonymous> (/mnt/c/tmp/serverless-azure/node_modules/azure-functions-core-tools/lib/install.js:63:7)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   code: 'ERR_INVALID_PROTOCOL'
npm ERR! }

As you can saw my proxy have HTTP PROTOCOL
I had to change my proxy protocol because with HTTPS doesn't work either

npm ERR! code 1
npm ERR! path C:\tmp\serverless-azure\node_modules\azure-functions-core-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node lib/install.js
npm ERR! attempting to GET "https://functionscdn.azureedge.net/public/3.0.3904/Azure.Functions.Cli.win-x64.3.0.3904.zip"
npm ERR! using proxy server "https://xxx.xxxx.xxx:xx"
npm ERR! node:_http_client:158
npm ERR!     throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol);
npm ERR!     ^
npm ERR!
npm ERR! TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
npm ERR!     at new NodeError (node:internal/errors:371:5)
npm ERR!     at new ClientRequest (node:_http_client:158:11)
npm ERR!     at request (node:https:353:10)
npm ERR!     at Object.get (node:https:387:15)
npm ERR!     at Object.<anonymous> (C:\tmp\serverless-azure\node_modules\azure-functions-core-tools\lib\install.js:63:7)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   code: 'ERR_INVALID_PROTOCOL'
npm ERR! }

I' m behind a proxy but it works normally with all npm packages

Additional Data

  • Operating System:
    Windows 10
  • Node Version:
    v16.14.0

Any feedback is appreciated!

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant