Sign in
Log inSign up

What's best way to install private package in deployment environment?

Han BaHwan's photo
Han BaHwan
·Jun 8, 2016

Hello. I'm trying to install private package in deployed nodejs app. Let me subscribe more detail environment. I use Dokku to implement PaaS and it works similar Heroku.

  1. When I use npm private, each deployed app needs authenticate npm.
  2. When I use git private, each deployed app needs ssh key.

First one needs custom build pack to install private package. I think it's not good idea. Fortunately, Dokku has shared-deployment ssh key plugin. So I chose second one.

But this also has a problem. The problem is that NPM doesn't execute prepublish or preinstall command for git repository installation.

What's alternative for this?