I have a very simple module that I want to use globally. I have already published it to npm as gammarouter-api.
I would like to know how can I test the module globally before publishing to npm (is npm link the answer?)
I noticed that all the modules that I install globally (I have no problems using any third party modules globally) goes to the folder /user/local/lib/node_module BUT my path does not contains this folder but /usr/local/bin, where I can find some files related to the global installed modules.
When I install my module with npm install -g gammarouter-api the folder gammarouter-api is created at /user/local/lib/node_module but nothing goes to /usr/local/bin, thats why its unreachable. Is there any setting/configuration/trick for this to work?
npm install . -g in the root of a module to install it globally. See the docs.bin property in you package.json is used to specify which executables should be added to the PATH. See the docs.For example:
{
"name": "my-module",
"bin": "./bin/script.js"
}