How to Publish NPM Package to Github

2023/2/11 min read
bookmark this
Responsive image

Modify Package.json

name

  "name": "@keke78ui9/node-reading"

publishConfig

"publishConfig": {
    "registry": "https://npm.pkg.github.com"
},

version

"version": "1.0.6",

Publish

Npm Login

npm login --scope=@NAMESPACE --auth-type=legacy --registry=https://npm.pkg.github.com
> UserName: username
> Password: token

Publish npm package

npm publish --access public

That's it