Skip to content

Instantly share code, notes, and snippets.

@nixjs
Created April 19, 2024 14:32
Show Gist options
  • Save nixjs/ee2daca5a977bed4f27fc2201f166026 to your computer and use it in GitHub Desktop.
Save nixjs/ee2daca5a977bed4f27fc2201f166026 to your computer and use it in GitHub Desktop.
How to publish package on npmjs
  1. Create .npmrc.
  2. Add //registry.npmjs.org/:_authToken=${NPM_TOKEN} in .npmrc file.
  3. Generate access token from npmjs and put in zshrc, bashrc.
  4. Login npmjs by terminal npm adduser 5.1. pnpm --filter=package_name publish --no-git-checks // use pnpm and workspace 5.2. yarn npm publish // use yarn 5.3. npm publish // use npm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment