Skip to main content
The meteor publish command publishes a new version of a package to the Meteor package server.

Usage

Basic Usage

Publish a package from the current directory:
This command must be run from a directory containing a package.js file.

Requirements

Before publishing:
  1. Version: Your package must have an explicit version set in Package.describe()
  2. Login: You must be logged in (meteor login)
  3. Package.js: A valid package.js file must exist
  4. Build: The package must build successfully

First-Time Publishing

When publishing a package for the first time, use the --create flag:

Package Naming

Package names should include your username as a prefix:
Top-level packages (without username prefix) can only be created by administrators. If you want to create a top-level package and are an admin, use:

Updating Package Metadata

To update metadata for an already-published version without re-publishing:
This updates:
  • Git URL
  • Version summary
  • Long-form description
  • Documentation
You can preview the results with:

Options

--create
boolean
default:"false"
Publish a new package (first-time publishing)
--update
boolean
default:"false"
Update metadata of a previously published version without re-publishing the package
--allow-incompatible-update
boolean
default:"false"
Allow packages in your project to be upgraded or downgraded to versions that are potentially incompatible with the current versions, if required to satisfy all package version constraints.
--no-lint
boolean
default:"false"
Don’t run linters on the published package and its local dependencies before publishing
--release
string
Specify the release of Meteor to resolve top-level version conflicts. Useful during migration when dealing with packages that have conflicting version requirements.
--top-level
boolean
default:"false"
Create a top-level package without an account prefix (administrators only)
--existing-version
boolean
default:"false"
(Internal) Publish using existing version with local source code. Good for bootstrapping core releases.

Examples

Publish a package for the first time:
Publish a new version:
Update metadata only:
Publish without running linters:
Publish with a specific release for version resolution:

Package Structure

A publishable package must have a package.js file:

Documentation

Your package should include documentation in a README file:
The README:
  • Must not be blank
  • Should explain how to use your package
  • Can use Markdown formatting
  • Will be displayed on the package page

Binary Packages

If your package contains binary code (native npm modules with C/C++ dependencies):

Automatic Compilation (Meteor 1.4+)

Meteor 1.4 and higher automatically compile packages with binary dependencies when they are installed, assuming the target machine has a basic compiler toolchain. Requirements: See node-gyp platform requirements

Publishing for Multiple Architectures

You can publish builds for specific architectures:
Run this on each architecture you want to support:
  • 32-bit Linux
  • 64-bit Linux
  • 64-bit macOS

Versioning

Follow semantic versioning (semver):
  • Patch (1.0.x): Bug fixes, no API changes
  • Minor (1.x.0): New features, backward compatible
  • Major (x.0.0): Breaking changes

Managing Maintainers

View or change package maintainers:

Authentication

Log in before publishing:
Check who you’re logged in as:
Log out:

Publishing Workflow

  1. Create or update your package code
  2. Update version in package.js
  3. Test the package thoroughly
  4. Update documentation in README
  5. Run linters (or use --no-lint if needed)
  6. Log in to Meteor account
  7. Publish the package
  8. Verify the package with meteor show

Troubleshooting

Version Already Exists

If the version already exists, increment the version number in package.js.

Blank README

You cannot publish with a blank README. Either:
  • Fill out the README
  • Set documentation: null in Package.describe()

Package Not Found

Ensure you’re in the correct directory containing package.js.

Linting Errors

Fix linting errors or use --no-lint to skip linting:

Not Logged In

Run meteor login before publishing.

Testing Before Publishing

Test your package before publishing:

After Publishing

After successfully publishing:
  1. The package is immediately available for others to use
  2. Refresh the catalog to see your update:
  3. View package information:

Best Practices

  1. Test thoroughly before publishing
  2. Use semantic versioning correctly
  3. Write good documentation in your README
  4. Keep dependencies minimal to avoid conflicts
  5. Specify version constraints for dependencies
  6. Don’t publish breaking changes in minor/patch versions
  7. Consider backward compatibility when updating