Ich bin neu bei Node und versuche, TypeScript mit dem folgenden Befehl zu installieren:
npm install -g TypeScript
Ich erhalte folgende Fehlermeldung:
if you are behind a proxy, please make sure that the 'proxy' config is set properly.
Ich habe meinen Proxy mit den folgenden Befehlen eingestellt:
npm config set proxy http://Username:[email protected]
npm config set https-proxy http://Username:[email protected]
und versuchte es auch:
npm config set proxy http://"ninjadev:[email protected]"@proxy.some-bigcorp.com
npm config set https-proxy http://"ninjadev:[email protected]"@proxy.some-bigcorp.com
Aber keiner von ihnen funktioniert. Ich arbeite hinter einem Firmen-Proxy mit Authentifizierung. Ich denke, das hindert mich daran, eine Verbindung herzustellen. Ich habe meinen Benutzernamen und mein Passwort hinzugefügt und das hat auch nicht funktioniert.
Hat jemand eine Idee, wie ich eine Verbindung zu npm herstellen kann, während ich den Firmen-Proxy und die Authentifizierung verwende?
Vielen Dank
Hast du es probiert?
npm config set proxy http://"ninjadev:[email protected]"@proxy.some-bigcorp.com:PORT
npm config set https-proxy http://"ninjadev:[email protected]"@proxy.some-bigcorp.com:PORT
wo kann PORT 8080 sein, wenn Sie keinen Proxy-Port haben?
Das hat für mich funktioniert:
npm config set https-proxy "ninjadev:[email protected]"@proxy.some-bigcorp.com:PORT
Ohne http/https
vorher.
Das funktionierte für mich: Npm config set proxy "http: //" Benutzername: Kennwort "@ proxy.big-corp.com"
npm config set proxy http: // "ninjadev: 5trongP @ ssw0rd" @ proxy.some-bigcorp.com: port
Dieses Ding hat für mich funktioniert.
Öffne cmd als Administrator und hinter dem Befehl. Ändern Sie den Befehl mit den angegebenen Anmeldeinformationen für u.
Stellen Sie in ubuntu-18.04 sicher, dass die Datei .npmrc
im Ausgangsverzeichnis Folgendes enthält:
proxy=http://username:[email protected]:port
https-proxy=http://username:[email protected]:port