create-react-app 报错 Unexpected end of JSON input while parsing near '

按照官方文档安装create-react-app后,执行npx create-react-app后报错:

Unexpected end of JSON input while parsing near ......

执行下面命令可解决

npm cache clean --force ,

:执行后可以用以下命令检查

npm cache verify

如果还是不行,查看一下npm版本,不是最新的更新一下:

npm i -g npm

再有就是试一下换npm的镜像服务器

npm config set registry http://registry.cnpmjs.org
npm config set registry http://registry.npmjs.org
npm config set registry https://registry.npm.taobao.org

create-react-app 报错 Unexpected end of JSON input while parsing near '

原文地址:https://www.cnblogs.com/johnjackson/p/10925308.html

时间: 2024-08-26 11:44:06

create-react-app 报错 Unexpected end of JSON input while parsing near '的相关文章

npm 在安装 Vue脚手架命令(npm install -g @vue/cli)时报错安装报错--“Unexpected end of JSON input while parsing near···”

在安装Vue的脚手架(npm install -g @vue/cli 项目名称)时,提示: Unexpected end of JSON input while parsing near 其实,但凡使用npm 时,只要提示这个,都可以按照以下几种方式进行尝试. 第一种:删掉package.lock.json 第二种:清除cache npm cache clean --force第三种:进入下面这个文件夹,把文件夹npm-cache下的内容删除掉(清除cache) 路径:C:/Users/DELL

NPM 解决Unexpected end of JSON input while parsing near 问题

问题描述 执行npm install命令的时候报错Unexpected end of JSON input while parsing near 原因分析 可能是缓存问题 解决方法 终端执行命令npm cache clean --force 完成后再执行命令npm install 处理结果 正常运行 原文地址:https://www.cnblogs.com/KevinTseng/p/12305896.html

解决【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":141072930277'.如下图: 解决方案直接执行 npm cache clean --force, 如果执行成功,再npm install即可.如果执行失败,请先升级npm,即npm i -g npm, 最后再执行npm cache clean --force, 最后再npm install.如果还执行失败,

npm install出现"Unexpected end of JSON input while parsing near"错误解决方法

今天在安装新的vue环境的时候报错了,错误为"Unexpected end of JSON input while parsing near........." 此时,运行代码: npm cache clean --force 问题就可以解决 原文地址:https://www.cnblogs.com/wxy-developer/p/9430181.html

npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz"

一.问题 npm安装时报错:npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz" 二.解决方法 npm cache clean --force 三.问题出现原因 四.此方法的利弊 -- 待查 -- npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz" 原文地址:https:

npm install "Unexpected end of JSON input while parsing near"问题

问题 最近配了台新电脑,开始装Node环境,去官网下载了最新的Node安装包.安装也没有问题,但是在使用npm install这个命令的时候,就会出现Unexpected end of JSON input while parsing near这个异常信息. 原因 最新版本的的Node.js与npm版本不合适的原因(因为没更新之前是不会的). 解决方案 将npm版本降到4.x版本 在Windows下使用cmd执行语句:npm -g i [email protected] Mac系统也差不多. 原

npm install 时出现 Unexpected end of JSON input while parsing near···

今早上下载vue/cli的时候,一直有这个错误.查了之后,得知原因是因为最新版本的Node.js与npm版本不适合(昨天刚下载了最新的node). 解决办法就是把npm的版本降到4版. 使用命令 npm -g i [email protected] 而且,还查到另外一种的解决办法: npm cache clean --force清理缓存,直接安装. 但是试过之后,还是不能解决这个问题. 所以这个方法可能不能解决node版本太高,导致npm版本不合适的问题.   原文地址:https://www.

从async await 报错Unexpected identifier 谈谈对上下文的理解

原文首发地址:http://www.cnblogs.com/lonhon/p/7518231.html 先简单介绍下async await: async/await是ES6推出的异步处理方案,目的也很明确:更好的实现异步编程.   详细见阮大神 ES6入门 现在说说实践中遇到的问题:使用await报错Unexpected identifier 先上代码: var sleep = function (time) { return new Promise(function (resolve, rej

webpack打包报错Unexpected token

最近项目要上线,需要对项目进行打包部署到服务器上面,在打包过程中npm run build后出现以下报错Unexpected token: punc (() [./~/[email protected]@element-ui/packages/col/src/col.js:23,0][static/js/0.3fbe30ed5a683f62d6bc.js:13890,10] 字面意思是报错来自UglifyJs,在col.js下23行出现了不期望的'(',打开col.js文件查看 不能识别这个函数