christian fei's blog

agile developer

clean code connoisseur && testing aficionado

read more about me or what i am doing now

read some posts that i wrote

follow me on twitter and connect with me on linkedin

distilling customer feedback at wonderflow

Edit this page on GitHub

Publishing org scoped npm packages with travis

written on Wed Nov 28 2018 00:00:00 GMT+0000 (Coordinated Universal Time)

by Christian Fei

If you stumbled upon this article, you are probably seeing the following error message on travis in the deployment stage:

Deploying application
npm ERR! publish Failed PUT 402
npm ERR! code E402
npm ERR! You must sign up for private packages : @christian_fei/pocket-sync

Btw, this is the .travis.yml configuraiton:

language: node_js
  - "10"
  - echo "deploying to npm"
  provider: npm
  email: [email protected]
  api_key: $NPM_TOKEN
    tags: true

To fix it, open your package.json and add the following configuration:

"publishConfig": {
  "access": "public"