报错日志:

ERR! registry error parsing json

ERR! registry error parsing json

解决过程:

从github上克隆一个项目,在npm i的时候,一直报npm err! registry error parsing json。请注意,在这儿有【registry】这个关键字哦,所以猜测是registry的问题,而公司用的网download是完全没有问题的。所以接下来我就试了一下淘宝镜像。

    npm config set registry http://registry.cnpmjs.org/

然而,天不随人意。依然没有解决问题,接着,我找了度娘,度娘也告诉我就是 registry 的问题,那肿么办呢?我原本用的是无镜像的,那我抱着试试的态度,再来了一次。但是我将registry的值改了一下:

npm config set registry https://registry.npm.taobao.org/

咦,这是一个什么鬼。居然成功了!!!

对头,mmp,他就是成功了。

希望能帮助到和我遇见同样问题的菜鸟。

并希望有料的大佬,能帮我解答一下,why...

扩展:

// 查看当前配置
npm config list // 安装镜像
npm config set registry https://registry.npm.taobao.org/
npm config set disturl https://npm.taobao.org/dist // 删除镜像
npm config delete registry
npm config delete disturl

ERR! registry error parsing json的更多相关文章

  1. 解决npm安装模块时 npm err! registry error parsing json

    最近还真是点背,从yeoman生成一个react项目或是github上克隆一个项目,在npm install的时候, 一直报npm err! registry error parsing json(就 ...

  2. 关于mac ox node安装报 npm ERR! registry error parsing json

    想安装grunt 遇到2个问题 让npm重新设置一下config: npm config set registry http://registry.cnpmjs.org 然后还报 npm ERR! E ...

  3. 【NPM】npm ERR! Unexpected end of JSON input while parsing near '...",'解决方案

    问题描述 今天安装项目依赖npm install 的时候出现错误: npm ERR! Unexpected end of JSON input while parsing near '...e&quo ...

  4. influxdb ERR: error parsing query: found -, expected

    ERR: error parsing query: found -, expected 使用时遇到这个问题,执行语句: select * FROM test10-cc-core01 本来以为和sql语 ...

  5. 解决npm ERR! Unexpected end of JSON input while parsing near的方法

    这两天执行 npm install 时会报错误: npm ERR! Unexpected end of JSON input while parsing near 清除cache npm cache ...

  6. npm install 安装项目依赖,报错ERR! Unexpected end of JSON input while parsing near的方法汇总

    问题描述: npm install 安装项目依赖的时候,有时会出现: ERR! Unexpected end of JSON input while parsing near 错误 原因: npm 的 ...

  7. npm ERR! Unexpected token in JSON at position 0 while parsing near '<HTML> 解决办法

    npm ERR! Unexpected token in JSON at position 0 while parsing near '<HTML> npm ERR! <!--/// ...

  8. npm ERR! Unexpected end of JSON input while parsing near '...inimist":"^1.2.0"}

    简介 在项目中执行npm install安装依赖包的时候.出现npm ERR! Unexpected end of JSON input while parsing near '...inimist& ...

  9. 解决【npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141072930277'】方案

    问题描述执行npm install的时候报错npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141 ...

随机推荐

  1. tomcat1章1

    package ex01.pyrmont; import java.net.Socket; import java.net.ServerSocket; import java.net.InetAddr ...

  2. javanio1----传统io

    import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import ...

  3. 洛谷 P2799 国王的魔镜

    把项链当做字符串输进去,可以用gets #include<iostream>#include<cstdio>#include<cmath>#include<c ...

  4. NUL和NULL

    此处讨论C语言中的NUL和NULL 1.NUL是ASCII字符集中'\0'字符的名字,它的字节模式为全0 2.NULL指一个其值为0的指针 3.它们都是整型值,其值也相同,所以可以互换使用 4.然而, ...

  5. 计算概论(A)/基础编程练习1(8题)/2:苹果和虫子

    #include<stdio.h> #include<math.h> int main() { /* n个苹果 每x小时能吃掉一个苹果 经过y小时 */ float n, x, ...

  6. python 3.7 方向键乱码

    原因是缺少安装包libreadline-dev 第一步安装libreadline-dev包:sudo apt-get install libreadline-dev(centos安装:yum -y i ...

  7. 阿里云centos远程连接mysql

    首先在服务器管理控制台设置防火墙规则 添加规则 使用root登录到mysql 添加一个用户名,权限为%的远程连接用户 grant all on *.* to 'yuancheng'@'%' ident ...

  8. 静态代码检查findbugs/阿里巴巴开发规范

    findbugs,基本上三类严重的bug检测出来都是比较准确的,如下: 阿里巴巴开发规范 前面两类都是比较重要的: 参考: https://blog.csdn.net/qq_27093465/arti ...

  9. 【题解】Luogu P4344 [SHOI2015]脑洞治疗仪

    原题传送门:P4344 [SHOI2015]脑洞治疗仪 前置芝士:珂朵莉树 窝博客里对珂朵莉树的介绍 没什么好说的自己看看吧 珂朵莉树好题啊 我一开始一直Re65 后来重构代码就ac了,或许是rp问题 ...

  10. How to Conduct High-Impact Research and Produce High-Quality Papers

    How to Conduct High-Impact Research and Produce High-Quality Papers Contents From Slide Russell Grou ...