Web tools: semantic-release and npm organizations

I like continuous-integration, Travis and semantic-release. They make new code available immediately, after automated testing. I'm working on VeraInView, and I hit a snag I wanted to note.

Normally, if you set up Travis and end with 'npm run semantic-release', it will publish your new module to NPM. However, with this project I got a 'forbidden' error returned from NPM. I am using an Org for this project, so its package name is @doe-casl/verain-view. That namespace means that the package is by default private, and as a result 'npm publish' defaults to private - which requires a paid npm account.

The solution is to publish your package manually the first time:

  • npm publish --access public --tag 1.0.0
I left off the --tag argument, and ended up with the first version being '0.0.0-semantic-release', which is why I added it above.

Hope that helps!
Post a Comment

Popular posts from this blog

Inno Setup MSVC vcredist without bothering your users

Inno Setup custom data directory location

Review: Javascript, The Good Parts, by Douglas Crockford