Install private npm modules on Heroku

Once you have signed up for a Gemfury account and uploaded a few packages, you can individually install them on Heroku by specifying the tarball in your package.json or by fully switching the registry via npmrc configuration. You can also find out more about Gemfury npm registry.

Your secret Registry URL

The secret registry URL is the npm endpoint for your Gemfury account and modules. Do not share this URL to keep your account private. The npm registry URL has the following format:

https://npm.fury.io/SeCrEt-ToKeN/me/

You can also access your account via our blending npm proxy that, in addition to serving your private packages, will fall back on the public npm index if a package is not available in your account:

https://npm-proxy.fury.io/SeCrEt-ToKeN/me/

Find out how to retrieve your Registry URL.

Use Gemfury as your default npm registry

By switching to Gemfury as your default npm registry, you can use our blending proxy to install packages from your Gemfury account and from the public npm index. You can make this switch by adding an npm configuration file {app-dir}/.npmrc to the root directory of your Heroku app:

registry=https://npm-proxy.fury.io/SeCrEt-ToKeN/me/
strict-ssl=true
ca=

Install modules via package.json

To specify an individual private module, you'll need to insert the tarball URL into your package.json file:

{
  "name": "node-example",
  "version": "0.0.1",
  "dependencies": {
    "dummy": "https://npm.fury.io/SeCrEt-ToKeN/me/dummy/-/latest.tgz"
  }
}

The tarball URL is built as follows:

https://npm.fury.io/{secret}/me/{package}/-/{version}.tgz

The secret is the same secret token that came with your Registry URL, package is the name of the npm module, and version is either a specific version number or the key "latest". The latest version is the highest releasable version as specified by the SemVer spec.