Publishing org scoped npm packages with travis

by Christian Fei @ 2018-11-28

84 words, 1 minute reading time

#post #js #tutorial #featured 


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"


Leave a comment

Better web scraping with node.js My blogging stack in 2020 Run cypress integration tests with github actions workflow Simple telegram message with github actions Deploy eleventy site with github actions on aws s3 Simple ad and trackers blocking with dns Build for a slow connection Upgrade mongodb 3 to 4 on ubuntu Publishing org scoped npm packages with travis A story about npm publish / unpublish