dominictarr / npmd

MIT License
450 stars 37 forks source link

`npmd install` eats it at Object.keys #17

Open trxcllnt opened 11 years ago

trxcllnt commented 11 years ago

npm install -g npmd npmd --sync npmd install browserify --greedy

/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-stream/sources.js:22
    array = Object.keys(array).map(function (k) {
                   ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at exports.values.exports.readArray (/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-stream/sources.js:22:20)
    at Function.s [as values] (/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-stream/node_modules/pull-core/index.js:43:31)
    at /Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/index.js:54:16
    at /Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-traverse/index.js:50:18
    at Array.0 (/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-traverse/index.js:8:7)
    at next (/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-traverse/index.js:45:13)
    at start (/Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-paramap/index.js:24:7)
    at /Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-paramap/index.js:44:20
    at /Users/ptaylor/dev/nvm/v0.10.15/lib/node_modules/npmd/node_modules/npmd-install/node_modules/pull-stream/throughs.js:25:5
dominictarr commented 11 years ago

confirmed, looking into this.

dominictarr commented 11 years ago

Okay, this is fixed in npmd-install 3.1.1 if you reinstall npmd you'll get that version and it should work.

This error was introduced when I added npmd install (with no args). Added the ability to install from a set of packages, but forgot to check if you where just installing one package...

trxcllnt commented 11 years ago

Any way to get npmd to install into a project's local node_modules dir, or do I have to copy the flattened modules folders from ~/.npmd/node_modules to my project's node_modules dir?

dominictarr commented 11 years ago

wow, oops!

this is fixed in 0.8.2

note to self: integration tests before anything else...