Skip to content

Instantly share code, notes, and snippets.

@dantullis
Created December 16, 2020 20:58
Show Gist options
  • Save dantullis/35dc59d3e8edf93db36aea9f3da7e53d to your computer and use it in GitHub Desktop.
Save dantullis/35dc59d3e8edf93db36aea9f3da7e53d to your computer and use it in GitHub Desktop.
Publish Package To NPMRegistry

Publish Package To NPM Registry

Account Verification

Do you have an account on https://www.npmjs.com?

Not sure? Try the following command to see if you are already logged in:

$ npm whoami

Also, go here to see if your name has been added to the NPM registry: https://www.npmjs.com/~<user_name>

Example: https://www.npmjs.com/~dantullis

If you don't have an account on NPMJS run the following command:

$ npm adduser

Follow the prompts and enter your username, password, and email address.

If you do have an account on NPMJS run the following command:

$ npm login

Follow the prompts and enter your username, password, and email address.

Publish

Note: Make sure your package name is unique

While inside the package directory run:

$ npm publish

Verify It Is Published

Navigate to a page similar to: https://www.npmjs.com/package/<package>

License

MIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment