Not Found - PUT https://npm.pkg.github.com/package-name

后端 未结 4 1837
萌比男神i
萌比男神i 2021-02-19 03:31

I\'m trying to upload a package on GPR (Github Package registry). I log in successfully:

npm login --registry=https://npm.pkg.github.com

and th

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 03:42

    There are two ways to solve this problem:

    1. Specify publishConfig option in package.json:
    "publishConfig": {
        "registry":"https://npm.pkg.github.com/@OWNER"
    },
    
    1. Add .npmrc file to your project with this content:
    registry=https://npm.pkg.github.com/@OWNER
    

    replacing OWNER with the name of the user or organization account on GitHub that owns the repository where you will publish the package.

提交回复
热议问题