Skip to content

Instantly share code, notes, and snippets.

View yardensk's full-sized avatar

Yarden Shem Tov yardensk

View GitHub Profile
@yardensk
yardensk / heroku-node-deployment-issues.md
Last active May 24, 2017 11:12
Heroku Node Deployment Issues

Heroku Node Deployment Issues

PROBLEM

You want to use a private NPM package (probably under @funfunfunco domain)

SOLUTION

Heroku needs access to the NPM domain, and this is done using NPM TOKEN.

  1. Go to your Heroku app and add new ENV variable: NPM_TOKEN=7ff9af33-a68e-45fe-b675-c6a98a20d733
  2. Create heroku_prebuild.sh in the same folder where package.json is and write to it: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
  3. Go to package.json and make it something like this: