I noticed on build https://travis-ci.org/neverendingqs/openssl-self-signed-certificate/builds/187723295 that I forgot to increase the patch version when tagging the repo. However, the build reported as passing
even though the npm publish failed due to the version already existing.
Here's the tail end of the log:
Deploying application
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
npm ERR! publish Failed PUT 403
npm ERR! Linux 4.8.12-040812-generic
npm ERR! argv "/home/travis/.nvm/v0.10.48/bin/node" "/home/travis/.nvm/v0.10.48/bin/npm" "publish"
npm ERR! node v0.10.48
npm ERR! npm v2.15.1
npm ERR! code E403
npm ERR! "You cannot publish over the previously published version 1.1.5." : openssl-self-signed-certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/neverendingqs/openssl-self-signed-certificate/npm-debug.log
No stash found.
Done. Your build exited with 0.
In case it's important, I have the test
script in packages.json
set to exit 0
, but that occurs before the publish phase, so that shouldn't be the problem(?).
Why didn't Travis CI report the build a failure when the publish failed?
EDIT:
I used the Travis CI CLI to set up NPM publishing by running travis setup npm
, based on https://docs.travis-ci.com/user/deployment/npm/.
My .travis.yml
looks like this:
language: node_js
deploy:
provider: npm
email: myemail
api_key:
secure: blahblahblah
on:
tags: true
repo: neverendingqs/openssl-self-signed-certificate