dominictarr / npmd

MIT License
449 stars 37 forks source link

can't install level-test #41

Open nrw opened 11 years ago

nrw commented 11 years ago

I'm getting this for several modules. This is right after a npmd --sync. Am I skipping a step?

$ npmd install level-test
execvp(): No such file or directory

/usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/index.js:128
            pkg.tree[_pkg.name] = _pkg
                                ^
TypeError: Cannot set property 'bindings' of undefined
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/index.js:128:33
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/node_modules/pull-stream/throughs.js:85:19
    at drain (/usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/node_modules/pull-paramap/index.js:17:11)
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/node_modules/pull-paramap/index.js:40:13
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/index.js:68:7
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/index.js:61:5
    at continuation (/usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/node_modules/continuable-para/node_modules/continuable-list/index.js:24:25)
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-tree/index.js:38:5
    at fs.js:266:14
    at /usr/local/share/npm/lib/node_modules/npmd/node_modules/npmd-install/node_modules/npmd-unpack/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:103:5

This is the output of npmd resolve level-test

{
  "name": "level-test",
  "version": "1.5.2",
  "shasum": "2c447023254cdd24b7bf2cf905d3052d0e4a2a07",
  "dependencies": {
    "level-js": {
      "name": "level-js",
      "version": "1.0.8",
      "shasum": "24586a1dbbc4f0205d007e79354a03065194b208",
      "from": "~1.0.8",
      "dependencies": {
        "idb-wrapper": {
          "name": "idb-wrapper",
          "version": "1.2.0",
          "shasum": "332aa6cd353bfe150f159feb5507a46b5528e34e",
          "from": "~1.2.0",
          "dependencies": {}
        },
        "isbuffer": {
          "name": "isbuffer",
          "version": "0.0.0",
          "shasum": "38c146d9df528b8bf9b0701c3d43cf12df3fc39b",
          "from": "~0.0.0",
          "dependencies": {}
        },
        "abstract-leveldown": {
          "name": "abstract-leveldown",
          "version": "0.7.2",
          "shasum": "5675283787c9e5157f4230e68aa71ff9c330c222",
          "from": "0.7.2",
          "dependencies": {}
        }
      }
    },
    "rimraf": {
      "name": "rimraf",
      "version": "2.2.4",
      "shasum": "9f0b530f829f7b655a6e4d2fd8cf4c042336ef58",
      "from": "~2.2.2",
      "dependencies": {
        "graceful-fs": {
          "name": "graceful-fs",
          "version": "2.0.1",
          "shasum": "7fd6e0a4837c35d0cc15330294d9584a3898cf84",
          "from": "~2",
          "dependencies": {}
        }
      }
    },
    "osenv": {
      "name": "osenv",
      "version": "0.0.3",
      "shasum": "cd6ad8ddb290915ad9e22765576025d411f29cb6",
      "from": "0.0.3",
      "dependencies": {}
    },
    "level": {
      "name": "level",
      "version": "0.18.0",
      "shasum": "e1a3f4cad65fc02e25070a47d63d7b527361c1cf",
      "from": ">=0.17",
      "dependencies": {
        "leveldown": {
          "name": "leveldown",
          "version": "0.10.1",
          "shasum": "20afdc8314c60017673cd2e21bf24a3f05e4f1e5",
          "gypfile": true,
          "from": "~0.10.0",
          "dependencies": {
            "bindings": {
              "name": "bindings",
              "version": "1.1.1",
              "shasum": "951f7ae010302ffc50b265b124032017ed2bf6f3",
              "from": "~1.1.1",
              "dependencies": {}
            },
            "nan": {
              "name": "nan",
              "version": "0.6.0",
              "shasum": "a54ebe59717b467c77425302bd7c17574c887aaa",
              "from": "~0.6.0",
              "dependencies": {}
            }
          }
        },
        "level-packager": {
          "name": "level-packager",
          "version": "0.18.0",
          "shasum": "c076b087646f1d7dedcc3442f58800dd0a0b45f5",
          "from": "~0.18.0",
          "dependencies": {
            "levelup": {
              "name": "levelup",
              "version": "0.18.2",
              "shasum": "58307e8448d3593ee3ed1cae94660e7451e9e60c",
              "from": "~0.18.0",
              "dependencies": {
                "errno": {
                  "name": "errno",
                  "version": "0.1.0",
                  "shasum": "f65eb3a27c47f1a9c325038f03f111d425ed1f77",
                  "from": "~0.1.0",
                  "dependencies": {
                    "prr": {
                      "name": "prr",
                      "version": "0.0.0",
                      "shasum": "1a84b85908325501411853d0081ee3fa86e2926a",
                      "from": "~0.0.0",
                      "dependencies": {}
                    }
                  }
                },
                "concat-stream": {
                  "name": "concat-stream",
                  "version": "0.1.1",
                  "shasum": "d7f4e278b90cfc4f0f3ef77fe4c03b40eb3f7900",
                  "from": "~0.1.1",
                  "dependencies": {}
                },
                "readable-stream": {
                  "name": "readable-stream",
                  "version": "1.0.17",
                  "shasum": "cbc295fdf394dfa1225d225d02e6b6d0f409fd4b",
                  "from": "~1.0.17",
                  "dependencies": {}
                },
                "xtend": {
                  "name": "xtend",
                  "version": "2.1.1",
                  "shasum": "d97a083e97cef3a331c4e9bd0201356711849b9f",
                  "from": "~2.1.1",
                  "dependencies": {
                    "object-keys": {
                      "name": "object-keys",
                      "version": "0.4.0",
                      "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336",
                      "from": "~0.4.0",
                      "dependencies": {}
                    }
                  }
                },
                "prr": {
                  "name": "prr",
                  "version": "0.0.0",
                  "shasum": "1a84b85908325501411853d0081ee3fa86e2926a",
                  "from": "~0.0.0",
                  "dependencies": {}
                },
                "semver": {
                  "name": "semver",
                  "version": "2.2.1",
                  "shasum": "7941182b3ffcc580bff1c17942acdf7951c0d213",
                  "from": "~2.2.1",
                  "dependencies": {}
                },
                "bops": {
                  "name": "bops",
                  "version": "0.1.1",
                  "shasum": "062e02a8daa801fa10f2e5dbe6740cff801fe17e",
                  "from": "~0.1.0",
                  "dependencies": {
                    "base64-js": {
                      "name": "base64-js",
                      "version": "0.0.2",
                      "shasum": "024f0f72afa25b75f9c0ee73cd4f55ec1bed9784",
                      "from": "0.0.2",
                      "dependencies": {}
                    },
                    "to-utf8": {
                      "name": "to-utf8",
                      "version": "0.0.1",
                      "shasum": "d17aea72ff2fba39b9e43601be7b3ff72e089852",
                      "from": "0.0.1",
                      "dependencies": {}
                    }
                  }
                },
                "deferred-leveldown": {
                  "name": "deferred-leveldown",
                  "version": "0.1.0",
                  "shasum": "35c0d94a900e1148a18f0363671d9933868d7943",
                  "from": "~0.1.0",
                  "dependencies": {
                    "abstract-leveldown": {
                      "name": "abstract-leveldown",
                      "version": "0.10.2",
                      "shasum": "bbd4e2a16df3a33e05d729b5fe6e72133196fc3e",
                      "from": "~0.10.1",
                      "dependencies": {}
                    },
                    "bops": {
                      "name": "bops",
                      "version": "0.0.7",
                      "shasum": "b4a0a5a839a406454af0fe05a8b91a7a766a54e2",
                      "from": "~0.0.6",
                      "dependencies": {
                        "base64-js": {
                          "name": "base64-js",
                          "version": "0.0.2",
                          "shasum": "024f0f72afa25b75f9c0ee73cd4f55ec1bed9784",
                          "from": "0.0.2",
                          "dependencies": {}
                        },
                        "to-utf8": {
                          "name": "to-utf8",
                          "version": "0.0.1",
                          "shasum": "d17aea72ff2fba39b9e43601be7b3ff72e089852",
                          "from": "0.0.1",
                          "dependencies": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "memdown": {
      "name": "memdown",
      "version": "0.5.1",
      "shasum": "3adf87daa1774cfe7352eed107046bcc452c4981",
      "from": "~0.5.1",
      "dependencies": {
        "abstract-leveldown": {
          "name": "abstract-leveldown",
          "version": "0.11.1",
          "shasum": "b1b57071390a7ca4e212b4830a39dde417b728b0",
          "from": "~0.11.0",
          "dependencies": {
            "xtend": {
              "name": "xtend",
              "version": "2.1.1",
              "shasum": "d97a083e97cef3a331c4e9bd0201356711849b9f",
              "from": "~2.1.1",
              "dependencies": {
                "object-keys": {
                  "name": "object-keys",
                  "version": "0.4.0",
                  "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336",
                  "from": "~0.4.0",
                  "dependencies": {}
                }
              }
            }
          }
        },
        "bops": {
          "name": "bops",
          "version": "0.1.1",
          "shasum": "062e02a8daa801fa10f2e5dbe6740cff801fe17e",
          "from": "~0.1.0",
          "dependencies": {
            "base64-js": {
              "name": "base64-js",
              "version": "0.0.2",
              "shasum": "024f0f72afa25b75f9c0ee73cd4f55ec1bed9784",
              "from": "0.0.2",
              "dependencies": {}
            },
            "to-utf8": {
              "name": "to-utf8",
              "version": "0.0.1",
              "shasum": "d17aea72ff2fba39b9e43601be7b3ff72e089852",
              "from": "0.0.1",
              "dependencies": {}
            }
          }
        }
      }
    }
  }
}
dominictarr commented 11 years ago

I just tested this and it worked for me, did you let --sync get up to 100? it's resolving it, so it's not that you don't have the stuff in the database.

what OS are you on?

npmd is implemented as a bunch of separate tools, which is helpful when debugging. can you try this:

npmd install npmd-install npmd-rebuild -g
npmd resolve level-test | npmd-install | npmd-rebuild 
nrw commented 11 years ago

I did let --sync reach 100. I'm on Mac OS 10.9.

I did get a successful install with this:

npmd install npmd-install npmd-rebuild -g
npmd resolve level-test | npmd-install

I'm happy to have a work-around. :) The second command you suggested (unaltered) gives me this:

$ npmd resolve level-test | npmd-install | npmd-rebuild

/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/clean.js:10
  var deps = pkg.dependencies || {}
                ^
TypeError: Cannot read property 'dependencies' of undefined
    at clean (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/clean.js:10:17)
    at /usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/index.js:138:39
    at loop (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-stream/sinks.js:11:19)
    at drain (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-paramap/index.js:20:11)
    at /usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-paramap/index.js:31:11
    at next (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-stream/sources.js:93:14)
    at /usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-stream/sources.js:98:16
    at Array.<anonymous> (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-stream/sources.js:15:7)
    at next (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-stream/sources.js:94:13)
    at start (/usr/local/share/npm/lib/node_modules/npmd-rebuild/node_modules/npmd-tree/node_modules/pull-paramap/index.js:28:7)

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: write EPIPE
    at errnoException (net.js:901:11)
    at Object.afterWrite (net.js:718:19)

I still get the same error I reported from npmd install level-test. Bug? Or broken installation for some other reason?

dominictarr commented 11 years ago

what version of npmd do you have?

npmd --version

I've been updating npmd very frequently recently, so you might try reinstalling it.

nrw commented 11 years ago

i was on 0.19.0 when i posted this issue. i've updated to 0.19.1 and still have this issue. i'm looking for a way to completely uninstall and remove the database for npmd. doing this didn't solve the problem:

npm uninstall -g npmd
npm install -g npmd
npmd --sync # started at 99.84%
npmd install level-test # same error as the top of this post

i'll see what i can find. i'm still open to suggestions. :)

nrw commented 11 years ago

update: i uninstalled npmd, removed the ~/.npmd directory, installed npmd with npm, and ran npmd --sync. i'm still getting the same error and i'm out of ideas for now. :P

dominictarr commented 11 years ago

oh! oops, I gave you the wrong syntax. I'm really sorry about this, I hadn't added the stdin handling to npmd-rebuild yet. thank you so much for bearing with me.

you just want to run npmd-rebuild after npmd-install so the correct command should just be this:

npmd resolve level-test | npmd-install && npmd-rebuild

Although, that doesn't explain the broken npmd result. can you try that? and also, can you post the output of

npmd-tree

AHA!!!! I think I have it!

do you or do you not have a package.json in the directory you are running the npmd-rebuild command from? right now it's assuming that there is a package.json. The first thing is a better error message for that thing, and the second thing is probably to make it still work without a package.json

pretty sure this is it! getting very similar output to you

nrw commented 11 years ago

first: here's the output of npmd-tree

{
  "name": "instances",
  "version": "0.0.0",
  "dependencies": {
    "coffee-script": {
      "name": "coffee-script",
      "version": "1.6.3",
      "from": "1.x.x"
    },
    "level": {
      "name": "level",
      "version": "0.18.0",
      "dependencies": {
        "level-packager": {
          "name": "level-packager",
          "version": "0.18.0",
          "from": "~0.18.0",
          "dependencies": {
            "levelup": {
              "name": "levelup",
              "version": "0.18.2",
              "from": "~0.18.0",
              "dependencies": {
                "bops": {
                  "name": "bops",
                  "version": "0.1.1",
                  "from": "~0.1.0",
                  "dependencies": {
                    "base64-js": {
                      "name": "base64-js",
                      "version": "0.0.2",
                      "from": "0.0.2"
                    },
                    "to-utf8": {
                      "name": "to-utf8",
                      "version": "0.0.1",
                      "from": "0.0.1"
                    }
                  }
                },
                "concat-stream": {
                  "name": "concat-stream",
                  "version": "0.1.1",
                  "from": "~0.1.1"
                },
                "deferred-leveldown": {
                  "name": "deferred-leveldown",
                  "version": "0.1.0",
                  "from": "~0.1.0",
                  "dependencies": {
                    "abstract-leveldown": {
                      "name": "abstract-leveldown",
                      "version": "0.10.2",
                      "from": "~0.10.1"
                    },
                    "bops": {
                      "name": "bops",
                      "version": "0.0.7",
                      "from": "~0.0.6",
                      "dependencies": {
                        "base64-js": {
                          "name": "base64-js",
                          "version": "0.0.2",
                          "from": "0.0.2"
                        },
                        "to-utf8": {
                          "name": "to-utf8",
                          "version": "0.0.1",
                          "from": "0.0.1"
                        }
                      }
                    }
                  }
                },
                "errno": {
                  "name": "errno",
                  "version": "0.1.0",
                  "from": "~0.1.0",
                  "dependencies": {
                    "prr": {
                      "name": "prr",
                      "version": "0.0.0",
                      "from": "~0.0.0"
                    }
                  }
                },
                "prr": {
                  "name": "prr",
                  "version": "0.0.0",
                  "from": "~0.0.0"
                },
                "readable-stream": {
                  "name": "readable-stream",
                  "version": "1.0.17",
                  "from": "~1.0.17"
                },
                "semver": {
                  "name": "semver",
                  "version": "2.2.1",
                  "from": "~2.2.1"
                },
                "xtend": {
                  "name": "xtend",
                  "version": "2.1.1",
                  "from": "~2.1.1",
                  "dependencies": {
                    "object-keys": {
                      "name": "object-keys",
                      "version": "0.4.0",
                      "from": "~0.4.0"
                    }
                  }
                }
              }
            }
          }
        },
        "leveldown": {
          "name": "leveldown",
          "version": "0.10.2",
          "gypfile": true,
          "from": "~0.10.0",
          "dependencies": {
            "bindings": {
              "name": "bindings",
              "version": "1.1.1",
              "from": "~1.1.1"
            },
            "nan": {
              "name": "nan",
              "version": "0.6.0",
              "from": "~0.6.0"
            }
          }
        }
      }
    },
    "level-test": {
      "name": "level-test",
      "version": "1.5.2",
      "dependencies": {
        "level": {
          "name": "level",
          "version": "0.18.0",
          "from": ">=0.17",
          "dependencies": {
            "level-packager": {
              "name": "level-packager",
              "version": "0.18.0",
              "from": "~0.18.0",
              "dependencies": {
                "levelup": {
                  "name": "levelup",
                  "version": "0.18.2",
                  "from": "~0.18.0",
                  "dependencies": {
                    "bops": {
                      "name": "bops",
                      "version": "0.1.1",
                      "from": "~0.1.0",
                      "dependencies": {
                        "base64-js": {
                          "name": "base64-js",
                          "version": "0.0.2",
                          "from": "0.0.2"
                        },
                        "to-utf8": {
                          "name": "to-utf8",
                          "version": "0.0.1",
                          "from": "0.0.1"
                        }
                      }
                    },
                    "concat-stream": {
                      "name": "concat-stream",
                      "version": "0.1.1",
                      "from": "~0.1.1"
                    },
                    "deferred-leveldown": {
                      "name": "deferred-leveldown",
                      "version": "0.1.0",
                      "from": "~0.1.0",
                      "dependencies": {
                        "abstract-leveldown": {
                          "name": "abstract-leveldown",
                          "version": "0.10.2",
                          "from": "~0.10.1"
                        },
                        "bops": {
                          "name": "bops",
                          "version": "0.0.7",
                          "from": "~0.0.6",
                          "dependencies": {
                            "base64-js": {
                              "name": "base64-js",
                              "version": "0.0.2",
                              "from": "0.0.2"
                            },
                            "to-utf8": {
                              "name": "to-utf8",
                              "version": "0.0.1",
                              "from": "0.0.1"
                            }
                          }
                        }
                      }
                    },
                    "errno": {
                      "name": "errno",
                      "version": "0.1.0",
                      "from": "~0.1.0",
                      "dependencies": {
                        "prr": {
                          "name": "prr",
                          "version": "0.0.0",
                          "from": "~0.0.0"
                        }
                      }
                    },
                    "prr": {
                      "name": "prr",
                      "version": "0.0.0",
                      "from": "~0.0.0"
                    },
                    "readable-stream": {
                      "name": "readable-stream",
                      "version": "1.0.17",
                      "from": "~1.0.17"
                    },
                    "semver": {
                      "name": "semver",
                      "version": "2.2.1",
                      "from": "~2.2.1"
                    },
                    "xtend": {
                      "name": "xtend",
                      "version": "2.1.1",
                      "from": "~2.1.1",
                      "dependencies": {
                        "object-keys": {
                          "name": "object-keys",
                          "version": "0.4.0",
                          "from": "~0.4.0"
                        }
                      }
                    }
                  }
                }
              }
            },
            "leveldown": {
              "name": "leveldown",
              "version": "0.10.2",
              "gypfile": true,
              "from": "~0.10.0",
              "dependencies": {
                "bindings": {
                  "name": "bindings",
                  "version": "1.1.1",
                  "from": "~1.1.1"
                },
                "nan": {
                  "name": "nan",
                  "version": "0.6.0",
                  "from": "~0.6.0"
                }
              }
            }
          }
        },
        "level-js": {
          "name": "level-js",
          "version": "1.0.8",
          "from": "~1.0.8",
          "dependencies": {
            "abstract-leveldown": {
              "name": "abstract-leveldown",
              "version": "0.7.2",
              "from": "0.7.2"
            },
            "idb-wrapper": {
              "name": "idb-wrapper",
              "version": "1.2.0",
              "from": "~1.2.0"
            },
            "isbuffer": {
              "name": "isbuffer",
              "version": "0.0.0",
              "from": "~0.0.0"
            }
          }
        },
        "memdown": {
          "name": "memdown",
          "version": "0.5.1",
          "from": "~0.5.1",
          "dependencies": {
            "abstract-leveldown": {
              "name": "abstract-leveldown",
              "version": "0.11.1",
              "from": "~0.11.0",
              "dependencies": {
                "xtend": {
                  "name": "xtend",
                  "version": "2.1.1",
                  "from": "~2.1.1",
                  "dependencies": {
                    "object-keys": {
                      "name": "object-keys",
                      "version": "0.4.0",
                      "from": "~0.4.0"
                    }
                  }
                }
              }
            },
            "bops": {
              "name": "bops",
              "version": "0.1.1",
              "from": "~0.1.0",
              "dependencies": {
                "base64-js": {
                  "name": "base64-js",
                  "version": "0.0.2",
                  "from": "0.0.2"
                },
                "to-utf8": {
                  "name": "to-utf8",
                  "version": "0.0.1",
                  "from": "0.0.1"
                }
              }
            }
          }
        },
        "osenv": {
          "name": "osenv",
          "version": "0.0.3",
          "from": "0.0.3"
        },
        "rimraf": {
          "name": "rimraf",
          "version": "2.2.4",
          "from": "~2.2.2",
          "dependencies": {
            "graceful-fs": {
              "name": "graceful-fs",
              "version": "2.0.1"
            }
          }
        }
      }
    },
    "mocha": {
      "name": "mocha",
      "version": "1.14.0",
      "dependencies": {
        "commander": {
          "name": "commander",
          "version": "2.0.0",
          "from": "2.0.0"
        },
        "debug": {
          "name": "debug",
          "version": "0.7.4",
          "from": "*"
        },
        "diff": {
          "name": "diff",
          "version": "1.0.7",
          "from": "1.0.7"
        },
        "glob": {
          "name": "glob",
          "version": "3.2.3",
          "from": "3.2.3",
          "dependencies": {
            "graceful-fs": {
              "name": "graceful-fs",
              "version": "2.0.1",
              "from": "~2.0.0"
            },
            "inherits": {
              "name": "inherits",
              "version": "2.0.1",
              "from": "2"
            },
            "minimatch": {
              "name": "minimatch",
              "version": "0.2.12",
              "from": "~0.2.11",
              "dependencies": {
                "lru-cache": {
                  "name": "lru-cache",
                  "version": "2.5.0",
                  "from": "2"
                },
                "sigmund": {
                  "name": "sigmund",
                  "version": "1.0.0",
                  "from": "~1.0.0"
                }
              }
            }
          }
        },
        "growl": {
          "name": "growl",
          "version": "1.7.0",
          "from": "1.7.x"
        },
        "jade": {
          "name": "jade",
          "version": "0.26.3",
          "from": "0.26.3",
          "dependencies": {
            "commander": {
              "name": "commander",
              "version": "0.6.1",
              "from": "0.6.1"
            },
            "mkdirp": {
              "name": "mkdirp",
              "version": "0.3.0",
              "from": "0.3.0"
            }
          }
        },
        "mkdirp": {
          "name": "mkdirp",
          "version": "0.3.5",
          "from": "0.3.5"
        }
      }
    },
    "npmd-tree": {
      "name": "npmd-tree",
      "version": "3.3.3",
      "dependencies": {
        "continuable": {
          "name": "continuable",
          "version": "1.1.8",
          "from": "~1.1.8"
        },
        "continuable-para": {
          "name": "continuable-para",
          "version": "1.2.0",
          "from": "~1.2.0",
          "dependencies": {
            "continuable-hash": {
              "name": "continuable-hash",
              "version": "0.1.4",
              "from": "~0.1.4",
              "dependencies": {
                "continuable": {
                  "name": "continuable",
                  "version": "1.1.8",
                  "from": "~1.1.6"
                }
              }
            },
            "continuable-list": {
              "name": "continuable-list",
              "version": "0.1.6",
              "from": "~0.1.5",
              "dependencies": {
                "continuable": {
                  "name": "continuable",
                  "version": "1.1.8",
                  "from": "~1.1.6"
                }
              }
            }
          }
        },
        "npmd-config": {
          "name": "npmd-config",
          "version": "1.0.7",
          "from": "~1.0.3",
          "dependencies": {
            "optimist": {
              "name": "optimist",
              "version": "0.6.0",
              "from": "~0.6.0",
              "dependencies": {
                "minimist": {
                  "name": "minimist",
                  "version": "0.0.5",
                  "from": "~0.0.1"
                },
                "wordwrap": {
                  "name": "wordwrap",
                  "version": "0.0.2",
                  "from": "~0.0.2"
                }
              }
            },
            "osenv": {
              "name": "osenv",
              "version": "0.0.3",
              "from": "~0.0.3"
            },
            "rc": {
              "name": "rc",
              "version": "0.3.2",
              "from": "~0.3.1",
              "dependencies": {
                "deep-extend": {
                  "name": "deep-extend",
                  "version": "0.2.6",
                  "from": "~0.2.5"
                },
                "ini": {
                  "name": "ini",
                  "version": "1.1.0",
                  "from": "~1.1.0"
                },
                "optimist": {
                  "name": "optimist",
                  "version": "0.3.7",
                  "from": "~0.3.4",
                  "dependencies": {
                    "wordwrap": {
                      "name": "wordwrap",
                      "version": "0.0.2",
                      "from": "~0.0.2"
                    }
                  }
                }
              }
            },
            "to-camel-case": {
              "name": "to-camel-case",
              "version": "0.2.0",
              "from": "~0.2.0"
            }
          }
        },
        "pull-fs": {
          "name": "pull-fs",
          "version": "1.1.3",
          "from": "1.1.3",
          "dependencies": {
            "pull-split": {
              "name": "pull-split",
              "version": "0.1.2",
              "from": "~0.1.1",
              "dependencies": {
                "pull-through": {
                  "name": "pull-through",
                  "version": "1.0.10",
                  "from": "~1.0.6",
                  "dependencies": {
                    "pull-stream": {
                      "name": "pull-stream",
                      "version": "2.20.1",
                      "from": "~2.20",
                      "dependencies": {
                        "pull-core": {
                          "name": "pull-core",
                          "version": "1.0.0",
                          "from": "~1.0.0"
                        }
                      }
                    }
                  }
                }
              }
            },
            "pull-stream": {
              "name": "pull-stream",
              "version": "2.20.1",
              "from": "~2.20",
              "dependencies": {
                "pull-core": {
                  "name": "pull-core",
                  "version": "1.0.0",
                  "from": "~1.0.0"
                }
              }
            }
          }
        },
        "pull-paramap": {
          "name": "pull-paramap",
          "version": "1.0.4",
          "from": "~1.0.4",
          "dependencies": {
            "pull-stream": {
              "name": "pull-stream",
              "version": "2.20.1",
              "from": "2.20",
              "dependencies": {
                "pull-core": {
                  "name": "pull-core",
                  "version": "1.0.0",
                  "from": "~1.0.0"
                }
              }
            }
          }
        },
        "pull-stream": {
          "name": "pull-stream",
          "version": "2.20.0",
          "from": "2.20.0",
          "dependencies": {
            "pull-core": {
              "name": "pull-core",
              "version": "1.0.0",
              "from": "~1.0.0"
            }
          }
        }
      }
    }
  }
}
nrw commented 11 years ago

this is the result of the latest rebuild command:

$ npmd resolve level-test | npmd-install && npmd-rebuild
WARN cd6ad8ddb290915ad9e22765576025d411f29cb6!==cd3dbfae582692563b85c1be7faea0990e047b27
redownloading: osenv@0.0.3==cd6ad8ddb290915ad9e22765576025d411f29cb6
WARN 7fd6e0a4837c35d0cc15330294d9584a3898cf84!==ec829a5953ea8ab7c1ba4c5de223ad6a44432ad6
redownloading: graceful-fs@2.0.1==7fd6e0a4837c35d0cc15330294d9584a3898cf84
GET http://isaacs.iriscouch.com/registry/osenv/osenv-0.0.3.tgz
GET http://isaacs.iriscouch.com/registry/graceful-fs/graceful-fs-2.0.1.tgz
WARN 9f0b530f829f7b655a6e4d2fd8cf4c042336ef58!==cbac6a7758c95ee16b75096091e0ad4bfae7ce76
redownloading: rimraf@2.2.4==9f0b530f829f7b655a6e4d2fd8cf4c042336ef58
GET http://isaacs.iriscouch.com/registry/rimraf/rimraf-2.2.4.tgz
{
  "name": "level-test",
  "version": "1.5.2",
  "shasum": "2c447023254cdd24b7bf2cf905d3052d0e4a2a07",
  "path": "/Users/nrw/instances/node_modules",
  "tmp": "/var/folders/d7/m51x5vt94299zydqhq7yq1pr0000gn/T/npmd-unpack-1385964451997-0.2311705225147307/package"
}

/usr/local/share/npm/lib/node_modules/npmd-rebuild/index.js:33
    if(err) throw err
                  ^
Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)

I don't want to rain on your "AHA!". :P ... but i do have a package.json in this folder. It looks like this:

{
  "name": "instances",
  "description": "instance registry",
  "version": "0.0.0",
  "main": "index.coffee",
  "scripts": {
    "start": "coffee index.coffee"
  },
  "dependencies": {
    "coffee-script": "1.x.x"
  },
  "devDependencies": {
    "mocha": "1.x.x"
  }
}

One more thing that might be related: installing packages like this: npmd install -g npmd-rebuild, does not result in adding a npmd-rebuild command to my path. it works without the global flag. it works with npm instead of npmd. Is there some configuration that needs to be done to have npmd drop bin files in npm's bin?

dominictarr commented 11 years ago

Ah, bummer. okay, now I can use that to install the deps you have and see if there are any problems... okay. I am installing your thing, hopefully I can reproduce this.

how did you install node? can you tell me the output of these commands:

npm config list --long #show npm's config
which npmd               #where did it put the npmd bin symlink
ls -l `which npmd`      #where did it install npmd
which node                #where is node installed.

I have implemented adding -g commands, and it works on my setup. This will help me figure out how to run it on osx

dominictarr commented 11 years ago

okay, I saw the same problem installing from your tree. I fixed a few things, and now it works for me. in can you install the latest npmd-rebuild@0.1.0 and try that? just runnpmd-rebuild` from your instances directory?

nrw commented 11 years ago

I installed node with homebrew. Here are the commands you requested.

$ npm config list --long
; cli configs
long = true
registry = "https://registry.npmjs.org/"

; userconfig /Users/nrw/.npmrc
loglevel = "http"

; builtin config undefined
prefix = "/usr/local/share/npm"

; default values
always-auth = false
bin-links = true
browser = null
cache = "/Users/nrw/.npm"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
color = true
coverage = false
depth = null
description = true
dev = false
editor = "nano"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
global = false
globalconfig = "/usr/local/share/npm/etc/npmrc"
globalignorefile = "/usr/local/share/npm/etc/npmignore"
group = 20
https-proxy = null
ignore = ""
init-module = "/Users/nrw/.npm-init.js"
init.author.email = ""
init.author.name = ""
init.author.url = ""
init.version = "0.0.0"
json = false
link = false
loglevel = "http"
; long = false (overridden)
message = "%s"
node-version = "v0.10.22"
npat = false
npaturl = "http://npat.npmjs.org/"
onload-script = false
optional = true
parseable = false
pre = false
; prefix = "/usr/local/Cellar/node/0.10.22" (overridden)
production = false
proprietary-attribs = true
proxy = null
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
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
tag = "latest"
tmp = "/var/folders/d7/m51x5vt94299zydqhq7yq1pr0000gn/T/"
umask = 18
unicode = true
unsafe-perm = true
usage = false
user = 501
user-agent = "node/v0.10.22 darwin x64"
userconfig = "/Users/nrw/.npmrc"
userignorefile = "/Users/nrw/.npmignore"
username = ""
version = false
versions = false
viewer = "man"
yes = null

$ which npmd
/usr/local/share/npm/bin/npmd

$ ls -l `which npmd`
lrwxr-xr-x  1 nrw  wheel  33 Dec  1 18:12 /usr/local/share/npm/bin/npmd -> ../lib/node_modules/npmd/index.js

$ which node
/usr/local/bin/node
nrw commented 11 years ago

We have a slightly more specific error with npmd-rebuild:

# in ~/instances
$ npm install -g npmd-rebuild
# normal install noise was here. successful install.

$ npmd-rebuild -v
0.1.0

$ npmd-rebuild
ERROR with node-gyp
1

/usr/local/share/npm/lib/node_modules/npmd-rebuild/index.js:39
      throw err
            ^
Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)
dominictarr commented 11 years ago

cool, that is progress.

Also, an obvious solution, I was assuming node-gyp was in your path. I've updated npmd-rebuild@0.1.1 so that it depends on it's own node-gyp version and will refer to that exactly.

do you use sudo when you npm install X -g?

figuring out the -g stuff is a little more complex, but I think we are nearly there with npmd-rebuild.

nrw commented 11 years ago

I do not use sudo when I npm install X -g.

I kinda thought i had node-gyp in my path too, but I don't.

I think we've resolved the npmd-rebuild issue! 0.1.1 built successfully (let me know if you want this full output).

$ npmd-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | darwin | x64
gyp info it worked if it ends with ok
...
gyp info ok

Thanks for hacking on that!

dominictarr commented 11 years ago

YUSS! awesome! thanks for helping me with this. Cool, I'll have a look into this -g thing.

nrw commented 10 years ago

the original issue posted seems to now be resolved (as of 0.20.0). npmd install level-test behaves as expected. installing with -g still does not behave correctly.

dominictarr commented 10 years ago

ah, I havn't been working on npmd this week, I should get back to it shortly, though.

nrw commented 10 years ago

no worries, just wanted anyone viewing this issue to have an update. thanks for your work!