报错日志:

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. 多进程wait、僵尸进程、孤儿进程、prctl

    1.概念 1.孤儿进程:一个父进程退出,而它的一个或多个子进程还在运行,那么那些子进程将成为孤儿进程.孤儿进程将被init进程(进程号为1)所收养,从而保证每个进程都会有一个父进程.而Init进程会自 ...

  2. .NET 常用ORM之iBatis

    ibatis 一词来源于“internet”和“abatis”的组合,是一个由Clinton Begin在2001年发起的开放源代码项目,到后面发展的版本叫MyBatis但都是指的同一个东西.最初侧重 ...

  3. GoldenGate实时投递数据到大数据平台(6)– HDFS

    GoldenGate可以实时将RDBMS的数据投递到HDFS中,在前面的文章中,已经配置过投递到kafka, mongodb等数据平台,本文通过OGG for bigdata的介质中自带的示例演示实时 ...

  4. Python进阶【第九篇】装饰器

    什么是装饰器 装饰器本身就是函数,并且为其他函数添加附加功能 装饰器的原则:1.不修改被装饰对象的源代码  2.不修改被装饰对象的调用方式装饰器=高阶函数+函数嵌套+闭包 # res=timmer(t ...

  5. Linux环境nginx的配置

    1.创建nginx运行账户www并加入到www组,不允许www用户直接登录系统,查看创建. groupadd www useradd -g www www -s /bin/false tail /et ...

  6. Python笔记 #20# SOM

    SOM(自组织映射神经网络)是一种可以根据输入对象的特征自动进行分类(聚类)的神经网络.向该网络输入任意维度的向量都会得到一个二维图像, 不同特征的输入会被映射到二维图像的不同地方(所以SOM也可以用 ...

  7. Urllib库及cookie的使用

    https://blog.csdn.net/pipisorry/article/details/47905781

  8. mysql启动、关闭与登录

    按照上述三篇随笔中的方法安装mysql,其启动.关闭和登录方法如下. mysql启动基本原理:/etc/init.d/mysqld是一个shell启动脚本,启动后最终会调用mysql\bin\mysq ...

  9. What is probabilistic programming? | 中文翻译

    What is probabilistic programming? | 中文翻译 Probabilistic languages can free developers from the compl ...

  10. markdown 换行

    基本语法 basic grammar line break