A client 'npm verify' would be handy to have available #1213

ctide opened this Issue Aug 2, 2011 · 5 comments


None yet

7 participants

ctide commented Aug 2, 2011

We have an open source project that consistently has non-node people running into issues such as :


Which is due to lack of familiarity with npm and node in general. It would be nice if we had an easy way in our startup script to just check if there are any unmet dependencies currently, and then prompt the user to run npm install to resolve that before trying to start their locker.


temas commented Aug 17, 2011


@thejh thejh added a commit to thejh/npm that referenced this issue Aug 17, 2011
@thejh thejh #1213: add "checkdeps" command 3a1194f
thejh commented Aug 17, 2011

If my pull request #1279 gets pulled, you can do this:

var npm = require("npm");
npm.load({}, function() {
  npm.commands.checkdeps([], true, function(err, result) {
    if (err) throw err;
    if (!result) {
      // unmet dependencies
@isaacs isaacs added a commit that referenced this issue Oct 3, 2011
@thejh @isaacs thejh + isaacs #1213: add "checkdeps" command 40217c0
isaacs commented Oct 3, 2011

@thejh Commented in the pull request a bit.

I think it'd be better to maybe have a few things done by a "verify" command:

  1. Make sure that any "bin" and "main" files exist.
  2. Validate that the dependencies are installed.
  3. Make sure that there are no bundledDependencies that aren't listed as dependencies.
  4. Make sure that there's a test script, and run tests, and make sure that they pass.
  5. Add the package to the cache, and verify that the tarball is not huge (say, assert that it's less than 50Mb)
dshaw commented Oct 6, 2011

+1 I prefer the semantic of npm verify over npm checkdeps from #1279.

@welwood08 welwood08 added a commit to welwood08/npm that referenced this issue Dec 27, 2011
@thejh @welwood08 thejh + welwood08 #1213: add "checkdeps" command 5ed2681
ralt commented Mar 9, 2013

This issue should be closed; its pull request was closed by isaacs 5 months ago.

@luk- luk- closed this Mar 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment