Currently NPM does not run prepublish after installing a package from a Git repository.
When working with a team (i.e: I cannot ask team members to run npm install
specifically on a dependent package), how can I use a package that requires a build step when installing from a Git repo?
To npm install a public project that is hosted on Github, and not the NPM registry, add the Github repo to package. json dependencies using the username/repo#branch-name format. Run npm install and npm will download the project and save it into your /node_modules/ folder.
json and publish it to npm using the same version. You can't publish again using the same version, or a previous one. You can read more about versioning here. Don't forget to build before publishing.
npm install : Installs the package from the hosted git provider, cloning it with git.
You can try this: https://www.npmjs.com/package/npm-git-install
It requires nodegit, so you'll have to be able to install that as well on your system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With