christian at agile venture bolzano 2019 christian fei's blog

agile developer, clean code connoisseur && testing aficionado

read more about me

scroll through posts that i wrote

follow me on twitter and github

Publishing org scoped npm packages with travis

written on 2018-11-28 by Christian Fei

#post #js #tutorial 

this

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
node_js:
  - "10"
script:
  - echo "deploying to npm"
deploy:
  provider: npm
  email: [email protected]
  api_key: $NPM_TOKEN
  on:
    tags: true

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

"publishConfig": {
  "access": "public"
},

this