package installation via npm failed
search cancel

package installation via npm failed

book

Article ID: 392811

calendar_today

Updated On:

Products

Cloud Secure Web Gateway - Cloud SWG

Issue/Introduction

NPM, which stands for Node Package Manager. It allows developers to easily install, update, and remove packages (also known as modules or libraries) from their projects. 

While installing package via npm using following command getting "npm error"

npm install <package-name>

Environment

Access menthod: IPsec tunnel

Traffic redirection: Explicit proxy over IPSec tunnel.

Windows OS

Cause

By default npm does not use Windows system proxy setting

Resolution

Set the proxy setting for npm by running the following two commands in Windows CMD and post that package install via npm will happen via Cloud proxy (i.e. ep.threatpulse.net:80)

npm config set proxy http://ep.threatpulse.net:80
npm config set https-proxy http://ep.threatpulse.net:80