dominictarr / npmd

MIT License
450 stars 37 forks source link

Cannot install modules with `._` in their name #61

Closed kenany closed 10 years ago

kenany commented 10 years ago

This works:

$ npmd-resolve --version
7.0.1
$ npmd-install --version
5.0.8
$ npmd-resolve lodash._objecttypes | npmd-install
{
  "name": "lodash._objecttypes",
  "version": "2.4.1",
  "shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11",
  "path": "/home/kenan/Code/rpn/node_modules/lodash._objecttypes"
}

But:

$ npmd --version
1.0.6
$ npmd install lodash._objecttypes
GET https://registry.npmjs.org/_objecttypes/-/_objecttypes-2.4.1.tgz

Error: error attemping to fetch: https://registry.npmjs.org/_objecttypes/-/_objecttypes-2.4.1.tgz {"error":"not_found","reason":"missing"}

    at Request._callback (/home/kenan/.npm-packages/lib/node_modules/npmd/node_modules/npmd-cache/index.js:49:23)
    at Request.self.callback (/home/kenan/.npm-packages/lib/node_modules/npmd/node_modules/npmd-cache/node_modules/request/request.js:121:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/home/kenan/.npm-packages/lib/node_modules/npmd/node_modules/npmd-cache/node_modules/request/request.js:978:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/kenan/.npm-packages/lib/node_modules/npmd/node_modules/npmd-cache/node_modules/request/request.js:929:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

lodash. is stripped from the module name. Probably because of the ._ in the name, since lodash.foreach (modules without _) work just fine.

dominictarr commented 10 years ago

dang it. okay this is just a regular expression somewhere...

dominictarr commented 10 years ago

no, it was that npmd didn't have an up to date version of npmd-cache. Fixed in npmd@1.0.7. good debugging. Thanks!

kenany commented 10 years ago

Awesome