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 :

in what is a package

i hope this could help you


Need Your Help

subscribing to a property change in a NavigationService page

c# windows-phone-7

I really am stuck with this, mainly because I don't quite get event handling.

Running DLR Embedded Scripts in Minimum Security Context

c# .net ironpython ironruby dynamic-language-runtime

I need to get pointed in the right direction. I have embedded an Iron Python scripting host into a simple C# application, but now I need to know the best practices for locking down security on a user

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.