Skip to content

Loading…

Grunt package ignores registry config setting on `npm install` #3271

Closed
colintheshots opened this Issue · 8 comments

7 participants

@colintheshots

Our restricted network requires that we use a proxy for all requests. We've had issues with HTTPS in the past, so we must install all of our packages with this npm setting:

npm config set registry http://registry.npmjs.org/

Recently, grunt stopped installing properly because it appears to be ignoring our package registry setting and going out to HTTPS anyway. If a registry setting is being forced, I would guess the same change may also break custom or personal repositories.

The grunt maintainers told me to file this as an issue against npm even though it only appears to affect grunt packages.

npm install
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http GET http://registry.npmjs.org/grunt-contrib-jshint/0.1.1
npm http GET http://registry.npmjs.org/grunt-contrib-less/0.5.0
npm http GET https://registry.npmjs.org/grunt-requirejs/-/grunt-requirejs-0.3.3.
tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt-requirejs/-/grunt-require
js-0.3.3.tgz
npm http 304 http://registry.npmjs.org/grunt-contrib-less/0.5.0
npm http 304 http://registry.npmjs.org/grunt-contrib-jshint/0.1.1
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http GET https://registry.npmjs.org/grunt-requirejs/-/grunt-requirejs-0.3.3.
tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt-requirejs/-/grunt-require
js-0.3.3.tgz
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! Error: tunneling socket could not be established, cause=14040:error:140
770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.
c:683:
npm ERR!
npm ERR! at ClientRequest.onError (C:\Program Files (x86)\nodejs\node_module
s\npm\node_modules\request\tunnel.js:161:17)
npm ERR! at ClientRequest.g (events.js:192:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR! at CleartextStream.socketErrorListener (http.js:1411:9)
npm ERR! at CleartextStream.EventEmitter.emit (events.js:96:17)
npm ERR! at SecurePair.exports.connect.cleartext._controlReleased (tls.js:13
16:15)
npm ERR! at SecurePair.EventEmitter.emit (events.js:96:17)
npm ERR! at SecurePair.error (tls.js:970:10)
npm ERR! at CleartextStream.CryptoStream._pull (tls.js:604:17)
npm ERR! at SecurePair.cycle (tls.js:891:20)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
@michaelahlers

I'm running into this exact problem as well.

$ npm install --dev
npm http GET https://registry.npmjs.org/testacular/0.6.1
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/testacular/0.6.1
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/testacular/0.6.1
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/grunt
npm ERR! Error: tunneling socket could not be established, cause=139807739934528:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683:
npm ERR! 
npm ERR!     at ClientRequest.onError (/usr/lib/nodejs/npm/node_modules/request/tunnel.js:161:17)
npm ERR!     at ClientRequest.g (events.js:192:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR!     at CleartextStream.socketErrorListener (http.js:1449:9)
npm ERR!     at CleartextStream.EventEmitter.emit (events.js:96:17)
npm ERR!     at SecurePair.exports.connect.cleartext._controlReleased (tls.js:1316:15)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:96:17)
npm ERR!     at SecurePair.error (tls.js:970:10)
npm ERR!     at CleartextStream.CryptoStream._pull (tls.js:604:17)
npm ERR!     at SecurePair.cycle (tls.js:891:20)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.38-16-generic
npm ERR! command "nodejs" "/usr/bin/npm" "install" "--dev"
npm ERR! cwd /home/mahlers/Private/Projects/angular-strap
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! code ECONNRESET
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/mahlers/Private/Projects/angular-strap/npm-debug.log
npm ERR! not ok code 0
@luk-

Does this happen on the latest node/npm?

@michaelahlers

Yes. (Well, almost.)

$ node -v
v0.10.3
$ npm -v
1.2.17

And here's the dependencies definition (this is from a third-party project I don't maintain).

{
  "devDependencies": {
    "testacular": "0.6.1",
    "grunt": ">= 0.4.0",
    "grunt-contrib-concat": "*",
    "grunt-contrib-jshint": "*",
    "grunt-contrib-uglify": "*"
  }
}
@mfncooper
npm member

Both @scoobrs and @michaelahlers are running just npm install. Without seeing the package.json file that is in the cwd when that command is run, we can't see exactly what npm is being asked to install, or where the URLs are coming from. Please post your package.json file so that we can take a look.

@michaelahlers

Oddly enough, this problem seems to have gone away. I haven't got a reason (looking into it).

@luk-

@scoobrs can you let us know your version of node/npm?

@iarna iarna added the support label
@othiym23

Closing as abandoned.

@othiym23 othiym23 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.