npm install问题汇总 1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一

版权声明:本文为CSDN博主「霜雪遥」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Yukinoshita_kino/article/details/107854889

一. 场景
我在安装better-scroll2.0没问题,但是在装它的下拉加载更多和上拉刷新插件时报了这个错,如下:

npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一


二. 解决办法
2.1 输入npm config list 命令查看当前配置情况,如下:

npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一

2.2 取消ssl验证,将npm的获取地址从https改为http

npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一

 npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一


2.3 查看修改后的配置npm config list

npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一

2.4 重新安装之前装不起的依赖,成功安装

npm install问题汇总
1. npm安装依赖时报 “xxx is not in the npm registry“错的解决办法之一

 (完)