Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 199 forks source link

Scoped packages should be published with --access=public #2751

Open aomarks opened 6 years ago

aomarks commented 6 years ago

By default, scoped packages on NPM are private. So the first time you publish an element (e.g. a new element to @polymer), it may fail because that scope may not be signed up for private packages (and if it was, you'd probably not want the private default).

https://docs.npmjs.com/getting-started/scoped-packages#publishing-a-scoped-package

This cropped up with the 3.0.0-pre.6 round of Polymer element conversions because @polymer/app-media had never been published:

app-media: Command failed: npm publish --tag next --public
npm ERR! publish Failed PUT 402
npm ERR! code E402
npm ERR! You must sign up for private packages : @polymer/app-media

Maybe we should just add --access public to https://github.com/PolymerLabs/polymer-workspaces/blob/master/src/npm.ts.

FredKSchott commented 6 years ago

I don't know about as a default for all users, but definitely for us / via a CLI argument / via a prompt

dfreedm commented 6 years ago

All that's required is adding

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

to the package.json

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.