I\'m developing two modules for NodeJS, first one named aligator and second one aligator-methods. Second one depends on first one to work. I\'m develop         
        
Fix for my version of this issue; in npm v5.3.0, I removed node_modules from repo I was linking into another project.
I found out that after npm v3 they try to put all node_modules dependencies into one node_modules directory (one in your project) to flatten the structure as much as possible (http://codetunnel.io/npm-5-changes-to-npm-link/).
I'm developing two packages, stejs, and stejs-loader. stejs-loader has stejs as a peerDependency. When I ran npm link stejs-loader and npm link stejs in my project I was getting an error that stejs-loader couldn't find stejs. I got it fixed by running npm link stejs in the directory of stejs-loader.
My issue ended up being that repo A was using npm and repo B was using yarn, so I needed to run yarn link in repo B in order to pull it in via npm link package-name into repo A.
What worked for me was to:
node_modules in both the dependency and the consumer module. npm unlink --no-save [dependency-module]Now I am able to fully test my unpublished module locally.
Additionally, there is an npm pack command which can help you test your unpublished modules, although not quite as robust.
npm-pack