How do you find out which NPM modules depend on yours?

Update: The registry API has changed, and may or may not let you talk directly to underlying CouchDB database. Fortunately, there is still a public mirror provided for replication at https://skimdb.npmjs.com/registry that you can still send queries to. To use:

https://skimdb.npmjs.com/registry/_design/app/_view/dependedUpon?group_level=3&startkey=%5B"socket.io"%5D&endkey=%5B"socket.io"%2C%7B%7D%5D&skip=0&limit=1000

For ease of reading, here are the querystring parameters from the example:

{ group_level: 3,
  startkey: '["socket.io"]',
  endkey: '["socket.io", {}]',
  skip: 0,
  limit: 1000 }

Note that as stated above, these are parameters for a CouchDB request. There doesn’t seem to be an endpoint on the official API to get this data, but there’s an issue open for the registry that you can follow here.


The closest thing you’d get to doing that is probably requesting JSON from the npm registry. For example, to get the packages dependent on Socket.IO, send a GET request to this link:

http://registry.npmjs.org/-/_view/dependedUpon?group_level=3&startkey=%5B%22socket.io%22%5D&endkey=%5B%22socket.io%22%2C%7B%7D%5D&skip=0&limit=1000

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)