报错日志:

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. ASP.NET Core Web API 索引 (更新Redis in .NET Core)

    https://www.cnblogs.com/cgzl/p/9178672.html

  2. 使用json对象要注意的地方

    本人是初学渣渣,使用json过程中遇到常见的问题,总结如下: 1--json对象内部不要有注释,虽然不报错,但是会使得渲染界面失败: 2--json对象是没有length属性的,若想获取到这个leng ...

  3. pic_scrapy_python

    # _*_ coding:UTF-8 _*_ import requests,json,time,sys from contextlib import closing class get_photos ...

  4. 怎样从外网访问内网Apache HTTP Server

    本地安装了一个Apache HTTP Server,只能在局域网内访问,怎样从外网也能访问到本地的Apache HTTP Server呢?本文将介绍具体的实现步骤. 1. 准备工作 1.1 安装并启动 ...

  5. MyEclipse 10.7(版本:eclipse 3.7.x-Indigo系列)安装PyDev 4.5.4插件

    解压安装路径结构如截图所示: 安装后重启:

  6. 2017第十三届湖南省省赛B - Simplified Blackjack CSU - 1998

    在一次聚会上,Bob打算和Alice一起玩Blackjack游戏,但Alice平时很少玩扑克类游戏,Bob觉得跟Alice解释清楚Blackjack的规则有点困难,于是Bob决定和Alice玩一次简化 ...

  7. springmvc的ajax返回406问题

    在springmvc中ajax请求写为XXX.html,如果在controller的如:@RequestMapping(value="/login/doLogin.html",pr ...

  8. [J2EE]struts+ejb笔记

    DispatchAtion: - org.apache.struts.actions.DispatchAction 这个类是个抽象类,但实现父类Action的execute方法,在项目中重写这个类可以 ...

  9. 使用ant对JS/CSS 进行压缩以提高网站性能

    减少HTTP请求是优化网站速度的一个重要手段, 所以对javascript/css两种文件进行压缩或合并都是非常必要的. 这里介绍利用ANT来自动进行文件合并和压缩. 3.1. javascript文 ...

  10. topcoder srm 535 div1

    problem1 link 对于每个质因子$p$,枚举其出现的最少次数以及最多次数分别在哪个数字中. problem2 link 分数规划.题目是求$\frac{3600K+\sum_{i=0}^{K ...