Manually install npm packages?

I am experimenting with the protractor and following the tuturial on github . NPM was already present on my system, I downloaded the protractor successfully and now I continue

webdriver-manager update

      

What fails with

downloading http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar...
Error: Got error Error: getaddrinfo ENOTFOUND from http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar
Updating chromedriver
Error: Got error Error: getaddrinfo ENOTFOUND from https://chromedriver.storage.googleapis.com/2.10/chromedriver_win32.zip
downloading https://chromedriver.storage.googleapis.com/2.10/chromedriver_win32.zip...

      

In the beginning, equal questions were answered. I double checked my npm proxy settings, everything is fine for http and https. Also I can see the username: password @ proxy definition in .npmrc in my userprofile directory (c: / Users / my-name), the files are also present on the internet. Also, the work on the npm machine was efficient. Now you can manually (through the browser download the appropriate files and blow them up and install in the designated places?

I am on Windows 7 SP 1, 32 bit.

+3


source to share


2 answers


Yes, you can manually install the webdriver-manager file to "node_modules \ protractor \ bin".

By the way, the error message really looks like you have problems accessing the internet. Have you tried setting these variables before running your npm command:



set HTTP_PROXY = http: // 'your http proxy ip': 'your proxy port'

set HTTPS_PROXY = http: // 'your https proxy ip': 'your proxy port'

+4


source


To answer my own question:

As Yannick mentioned: I only set the proxy config with npm config ... For that you also need to set environment variables



set PROXY=http://<username>:<password>@proxyserver
set HTTP_PROXY=%PROXY%
set HTTPS_PROXY=%PROXY% 

      

+2


source







All Articles