Publish a package to the npm registry with npm publish

domain: docs.npmjs.com · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Verify package.json has a unique name and version (both required to publish).
  2. Log in first: `npm login` (or ensure a valid auth token is present in ~/.npmrc).
  3. Run `npm publish` from the package root to publish the current folder's package.json project.
  4. By default this publishes to the public npm registry; scoped packages default to public for new packages unless --access=restricted is set.
  5. npm submits sha1 and sha512 integrity for the tarball; installs later verify against it.
  6. A `latest` tag is applied by default; pass `--tag <name>` to publish under a different dist-tag.

Known gotchas

Related routes

Publish a Node package to GitHub Packages npm registry with a token
github-packages · 6 steps · unrated
Publish an npm package to the public registry for the first time
npmjs.com · 5 steps · unrated
Publish a scoped npm package from a workspace monorepo to the npm registry
docs.npmjs.com · 7 steps · unrated

Give your agent this knowledge — and 16,900+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans