ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/itheima-toolscxs - Forbid

在这里插入图片描述
出现这个原因是因为输入的邮箱📮没有校验,⚠️查看手机的邮箱的文件点击验证!!!

npm倒包的时候要注意⚠️
不能是镜像的

choigail@cuijiayideMacBook-Air ~ % nrm ls

  npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
* taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/

像这样就是在淘宝镜像里面就不行,往npm上面传一定要在npm上面!


choigail@cuijiayideMacBook-Air ~ % nrm use npm

切换一下

choigail@cuijiayideMacBook-Air ~ % nrm ls

* npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/

choigail@cuijiayideMacBook-Air ~ % npm login

之后就一定可以成功!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
### 回答1: "cnpm" 是一个 npm 的镜像,通过使用 "--registry=https://registry.npm.taobao.org" 参数,你可以将其安装到全局环境,以使用淘宝 NPM 镜像服务器上的资源。 执行以下命令可以安装 cnpm: ``` npm install -g cnpm --registry=https://registry.npm.taobao.org ``` ### 回答2: npm install -g cnpm --registry=https://registry.npm.taobao.org 是一个用于安装 cnpm 的命令。 cnpm 是一个用于管理 Node.js 包的工具,与 npm 类似,但可以在中国地区提供更快速可靠的下载速度。npm 是官方的 Node.js 包管理器,但由于国内网络环境的限制,使用 npm 安装时可能会受限于官方源的下载速度过慢的问题。 在命令 npm install -g cnpm --registry=https://registry.npm.taobao.org 中,-g 参数表示全局安装 cnpm,即该工具将被安装为系统的全局命令。--registry=https://registry.npm.taobao.org 则指定了 cnpm 的安装源为淘宝的 npm 镜像源。 使用 cnpm,可以通过 cnpm install 命令来快速下载和安装 Node.js 包。相较于 npm,cnpm 提供了更高的下载速度,尤其适用于在中国访问速度较慢的情况下使用。安装 cnpm 后,我们可以在终端或命令提示符中使用 cnpm 来代替 npm 命令,从而享受到更好的下载速度。 总而言之,npm install -g cnpm --registry=https://registry.npm.taobao.org 命令的目的是为了在全局环境下安装 cnpm 工具,以便在中国地区快速下载和安装 Node.js 包。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值