How to reference module from dependencies of another module

I have a project with 2 dependenies:

{
  dependencies: {
    "nommon": "*",
    "descript": "*"
  }
}

Module descript itself depends on module nommon. I want nommon reference to be the same as in descript dependencies.

So, all I want is something like this:

{
  dependencies: {
    "nommon": "./decript/node_modules/nommon",
    "descript": "*"
  }
}

I know about npm link but it is a manual operation.

I want a package.json dependency declaration so that after npm install I get an up and running package.

Currently I solved this with adding a symlink manually.

if i understand well : descript project need nommon to run and you don't want to use npm link ?

the easiest way is to publish your module nommon to npm registry. in this case you will set dependencies like any other module.

if you don't want that your module to become public, you can store a tarball of nommon on a server and set as dependency the url resolving the tarball. you also can use a git repository

take a look here :

https://npmjs.org/doc/developers.html

in what is a package

i hope this could help you

Ostro