Installing packages from github npm registry - auth error 401

后端 未结 3 2047
囚心锁ツ
囚心锁ツ 2021-02-18 21:37

I have just published a private package on GitHub, trying to figure out how it should be working. now I\'m trying to install it in another project. I authenticated with np

3条回答
  •  借酒劲吻你
    2021-02-18 21:45

    Apparently I'm an idiot who can't read documentation and missed that part:

    In the same directory as your package.json file, create or edit an .npmrc file to include a line specifying GitHub Packages URL and the account owner. Replace OWNER with the name of the user or organization account that owns the repository containing your project.

    registry=https://npm.pkg.github.com/OWNER

提交回复
热议问题