npm包发布--私库(二)

npm包的发布–私库(二)

之前讲述过npm包的发布,但是如果上传的地址不是https://www.npmjs.com/,而是公司的nexus私库,那么上传方式与上传到官网是有些不一样的,这里的官网是指https://www.npmjs.com/。

在开始之前,首先需要确定你在nexus中添加权限, 有add申请添加提交到私库的权限,或者私库中某个地址提交代码的权限

尝试直接操作

先按照之前的方式发布,首先登录

npm login

这里我们输入的username password email是公司nexus私库的用户名账号 密码与邮箱

终端报错

npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

我发现它提示

你可能感兴趣的:(前端模块开发,npm)