Publishing a package for the first time - mzogheib/quoll GitHub Wiki

Background

  • If attempting to publish the first version for a scoped package via yarn release you will get an NPM error:
lerna WARN notice Package failed to publish: @quoll/some-package
lerna ERR! E402 You must sign up for private packages
lerna ERR! errno "undefined" is not a valid exit code - exiting with code 1

Solution

  • Run yarn release as normal, because this will create the tags and update dependencies in the repo.
  • Then manually publish the new package.
cd packages/some-package
npm publish --access public

⚠️ This may not be the best solution but it's good enough for now.