npm_lazy error when a module hosted in a private github repo is referenced in package.json
Opened this issue · 0 comments
Recently I noticed the following behavior:
1: After adding a module hosted in a private Github repo to package.json as:
"mymodule": "mygithubaccount/mymodule#master"
and attempting to npm install, npm_lazy returns:
npm ERR! TypeError: Cannot call method 'match' of undefined
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:119:29)
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:158:9)
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:252:14)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:877:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:828:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
2: However, if I change the module reference in package.json to be:
"mymodule":"git+ssh://git@github.com:mygithubaccount/mymodule#master"
then npm install via npm_lazy completes with no errors
3: npm install completes successfully for both of the above cases when npm_lazy is not used
Not sure if npm_lazy requires a fully qualified reference (eg. git+ssh...) by design or if this can be considered a bug. Either way not a big deal just thought I would share.
Thanks