If you want to test a generated package module in your project there is many solutions.
Assuming I'm developing module-x and I want to integrate it in project-x project.
cd ~/devel/modules/module-x/
npm link
cd ~/devel/projects/project-x
npm link module-x # According to the `name` defined in `package.json` of `module-x`It will perform an npm install in ~/devel/modules/module-x folder then make a symlink of module-x in the project-x folder.
All modifications of module-x will directly apply. You could have some issues due to the internal npm install.
An alternative is to point a folder during the npm install
npm i ~/devel/modules/module-x
It will create a symlink, like the npm link, but it will update the package.json to.
This method install your package like a real package.
cd ~/devel/modules/module-x
npm pack # Generation of a bundled file
cd ~/devel/projects/project-x
npm install ~/devel/modules/module-x/module-x-1.0.0.tgzIt will also update your package.json