I have searched this topic for long time, currently all the solutions and examples work in git, but no direct solution for Mercurial.
Working example taken from somewhere similar links.
"private": true
to your package.json
Then to reference private npm module in package.json
{
    "name": "myapp",
    "dependencies": {
        "private-repo": "git+ssh://git@github.com:myaccount/myprivate.git#v1.0.0",
    }
}
As I read from official npm page this all works only with git https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
So how to do the same thing in Mercurial or currently it's seems to be possible only with Git ?
 
     
     
    