npm 发布命名空间的包

156 阅读1分钟

首先发生如下报错

npm notice Publishing to https://registry.npmjs.org/
npm ERR! code E402
npm ERR! 402 Payment Required - PUT https://registry.npmjs.org/@pvjs%2fnodejs-monitor - You must sign up for private packages

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.npm/_logs/2023-12-06T03_08_04_943Z-debug-0.log

需要增加如下配置

  "publishConfig": {
    "access": "public",
    "registry": "https://registry.npmjs.org/"
  },

更多讨论参考github.com/lerna/lerna…