1

I'm new to NPM (obviously) and I have forked a NPM module to test out some custom modifications to it - let's call that project dependsOnMe. Now i want to use DependsOnMe in my CustomApp project. I can't figure out how to do this.

In my DependsOnMe project I did a npm install -g . (whatever that does, it's now unclear to me), but when I go to my CustomApp project and add a dependency for DependsOnMe into my package.json NPM tells me it cant find DependsOnMe in the NPM remote repo (no kidding...).

Since I installed DependsOnMe globally I thought perhaps I don't need to declare a dependency in MyCustomApp, but when I try to include DependsOnMe in one of my project's .js files I get the error that DependsOnMe cannot be found.

This must be simple, what am I missing?

Patrick
  • 827
  • 3
  • 14
  • 20
  • As per my Knowledge you need to register and Publish package to npm and then install it with npm https://docs.npmjs.com/cli/publish – Prasad Feb 28 '16 at 13:41
  • Well, I see this suggestion, but it doesn't work either - it tells me it cant find the directory: http://stackoverflow.com/questions/14381898/local-dependency-in-package-json – Patrick Feb 28 '16 at 13:42
  • https://quickleft.com/blog/creating-and-publishing-a-node-js-module/ – Prasad Feb 28 '16 at 13:42
  • I got it working by including a local dependency as a relative path (was using absolute and it didn't work): "DependsOnMe": "file:../../../../depends-on-me/" – Patrick Feb 28 '16 at 14:15
  • @Patrick thanks for the DependsOnMe option – Peter Kahn Aug 01 '16 at 16:24

0 Answers0