0

This is the error, doesn't make me install nothing:

npm WARN invalid config https-proxy="http:" npm WARN invalid config Must be a full url with 'http://'

I try a lot of things: uninstall/install node and npm

  • clean npm cache
  • npm config delete https-proxy
  • set npm ssl to false
  • npm config set registry http://registry.npmjs.org/
  • tried to override it with npm config set https-proxy http://proxy.company.com:8080
  • open and change manually npmrc global and local files
  • I get response doing ping to registry.npmjs.org and google.es in console.

Even I uninstall all node and make a new compilation and error persist.

npm config get https-proxy and npm config get http-proxy

returns me null both.

my /home/usertv/npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'cordova' ]
2 info using [email protected]
3 info using [email protected]
4 warn invalid config https-proxy="http:"
5 warn invalid config Must be a full url with 'http://'
6 verbose cache add [ 'cordova', null ]
7 verbose cache add name=undefined spec="cordova" args=["cordova",null]
8 verbose parsed url { protocol: null,
8 verbose parsed url   slashes: null,
8 verbose parsed url   auth: null,
8 verbose parsed url   host: null,
8 verbose parsed url   port: null,
8 verbose parsed url   hostname: null,
8 verbose parsed url   hash: null,
8 verbose parsed url   search: null,
8 verbose parsed url   query: null,
8 verbose parsed url   pathname: 'cordova',
8 verbose parsed url   path: 'cordova',
8 verbose parsed url   href: 'cordova' }
9 silly lockFile a98f2055-cordova cordova
10 verbose lock cordova /root/.npm/a98f2055-cordova.lock
11 silly lockFile a98f2055-cordova cordova
12 silly lockFile a98f2055-cordova cordova
13 verbose addNamed [ 'cordova', '' ]
14 verbose addNamed [ null, '*' ]
15 silly lockFile de8d9fad-cordova cordova@
16 verbose lock cordova@ /root/.npm/de8d9fad-cordova.lock
17 silly addNameRange { name: 'cordova', range: '*', hasData: false }
18 verbose url raw cordova
19 verbose url resolving [ 'http://registry.npmjs.org/', './cordova' ]
20 verbose url resolved http://registry.npmjs.org/cordova
21 info trying registry request attempt 1 at 12:25:02
22 http GET http://registry.npmjs.org/cordova
23 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
24 info trying registry request attempt 2 at 12:25:13
25 http GET http://registry.npmjs.org/cordova
26 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
27 info trying registry request attempt 3 at 12:26:13
28 http GET http://registry.npmjs.org/cordova
29 silly lockFile de8d9fad-cordova cordova@
30 silly lockFile de8d9fad-cordova cordova@
31 error network getaddrinfo ENOTFOUND
31 error network This is most likely not a problem with npm itself
31 error network and is related to network connectivity.
31 error network In most cases you are behind a proxy or have bad network settings.
31 error network
31 error network If you are behind a proxy, please make sure that the
31 error network 'proxy' config is set properly.  See: 'npm help config'
32 error System Linux 3.2.0-4-686-pae
33 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova"
34 error cwd /home/usertv
35 error node -v v0.10.24
36 error npm -v 1.3.21
37 error syscall getaddrinfo
38 error code ENOTFOUND
39 error errno ENOTFOUND
40 verbose exit [ 1, true ]

my npm config ls -l

; cli configs
long = true
registry = "http://registry.npmjs.org/"

; userconfig /home/usertv/.npmrc
registry = "http://registry.npmjs.org/"
strict-ssl = false

; globalconfig /usr/local/etc/npmrc
registry = "http://registry.npmjs.org/"

; default values
always-auth = false
bin-links = true
browser = null
cache = "/home/usertv/.npm"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cert = null
color = true
depth = null
description = true
dev = false
editor = "vi"
email = null
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
globalconfig = "/usr/local/etc/npmrc"
globalignorefile = "/usr/local/etc/npmignore"
group = 1000
heading = "npm"
https-proxy = null
ignore-scripts = false
init-module = "/home/usertv/.npm-init.js"
init.author.email = ""
init.author.name = ""
init.author.url = ""
init.license = "ISC"
json = false
key = null
link = false
local-address = undefined
loglevel = "http"
; long = false (overridden)
message = "%s"
node-version = "v0.10.24"
npat = false
onload-script = false
optional = true
parseable = false
prefix = "/usr/local"
production = false
proprietary-attribs = true
proxy = null
rebuild-bundle = true
; registry = "https://registry.npmjs.org/" (overridden)
rollback = true
save = false
save-bundle = false
save-dev = false
save-optional = false
searchexclude = null
searchopts = ""
searchsort = "name"
shell = "/bin/bash"
shrinkwrap = true
sign-git-tag = false
; strict-ssl = true (overridden)
tag = "latest"
tmp = "/home/usertv/tmp"
umask = 18
unicode = true
unsafe-perm = true
usage = false
user = 0
user-agent = "node/v0.10.24 linux ia32"
userconfig = "/home/usertv/.npmrc"
username = ""
version = false
versions = false
viewer = "man"
5
  • 1
    Try to run curl http://registry.npmjs.org/cordova and make sure it outputs a valid JSON. I smell network issues here. Commented Jan 4, 2014 at 0:36
  • thx for response. i don't know what i did but now only fail when try to install in global. I'm starting to think it's some kind of problem of my VPN cache of my job. I'm with debian 7 and i use network connection. tomorrow i'll probe the curl (just now i'm going to bed) so much thx again. Commented Jan 4, 2014 at 1:21
  • Curl it's ok, it returns the JSON. Commented Jan 4, 2014 at 19:06
  • still yet with this f**** error. Commented Feb 19, 2014 at 18:05
  • Finally i could fixed with next steps: 1.sudo gedit /root/.npmrc set proxy to 127.0.0.1 ------ 2. npm clear cache ---- Commented Feb 21, 2014 at 12:25

1 Answer 1

1

It was a connection problem.

I remember thatI played with proxy configuration by mistake like this :

   npm config set proxy http://localhost:8080/
   npm config set https-proxy http://localhost:8080/
   npm config set strict-ssl false

which made npm client attempts to hit localhost:8080 to pull the module rather than the correct internet endpoint.

so after couple of days of frustration i visited this link

https://docs.npmjs.com/cli/config

then run

npm config edit

which opened a file inside that file i removed those three lines i added above , then everything worked fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.