解决npm ERR!
一:[Unexpected end of JSON input while parsing near]报错
最近的vue项目中在执行 npm install 时会报错误:
npm ERR! Unexpected end of JSON input while parsing near
这个错误的解决方法有以下几种:
1.删掉package.lock.json
2.清除cache
npm cache clean --force
3.进入下面这个文件夹清除cache
路径:C:Users PCAppDataRoamingnpm-cache
执行:
npm cache clean --force
4.不要用淘宝镜像。
npm set registry https://registry.npmjs.org/
参考资料:https://github.com/vuejs-temp...
二:A complete log of this run can be found in 报错
最近的vue项目中在执行 npm install 时会报错误:
通过“A complete log of this run can be found in”发现,原来是npm版本的问题,然后更新了npm版本,然后再装脚手架,就搞定了。
全局更新
npm install npm -g
或者用淘宝镜像命令
cnpm install npm -g
解决npm ERR!的更多相关文章
- 解决npm ERR!Unexpected end of JSON input while paring near (解析附近时JSON输入意外结束)'...."^2.0.0-rc.0","glob"'等npm install错误
摘要 最近更新了一次node,但是更新后npm的命令总是会报 npm WARN deprecated fsevents@2.0.6: Please update: there are crash fi ...
- 解决npm ERR! Please try running this command again as root/Administrator. 问题
win10下,使用npm 安装插件时报npm ERR! Please try running this command again as root/Administrator的错误, 解决方案:需要删 ...
- 解决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 ...
- [已解决] npm ERR! code EINVALIDPACKAGENAME Invalid package name "": name cannot start with an underscore;
打开 cmd 输入 `npm update -g` 等待更新完成即可
- 解决npm ERR! Unexpected end of JSON input while parsing near的方法汇总
参考链接:https://segmentfault.com/a/1190000015646531
- 安装Vue2的devtools发生错误npm ERR! code EINTEGRITY npm ERR! sha1-HTFDXrRzR2Ew8Bv9zlMSCVgPsS0= integrity checksum failed when using sha1: wanted sha1-HTFDXrRzR2Ew8Bv9zlMSCVgPsS0= but got sha1-Z6BeTMF4nhAO6h5A
1.github下载地址:https://github.com/vuejs/vue-devtools 2.下载好后进入vue-devtools-master工程 执行npm install ---- ...
- npm install 超时 国内 切换源; npm ERR! code ELIFECYCLE;
install 超时 查看npm源地址 npm config get registry #http://registry.npmjs.org 为国外镜像地址 设置阿里云镜像 npm config se ...
- npm ERR!无法安装任何包的解决办法
npm ERR! Windows_NT 6.1.7601npm ERR! argv "E:\\node\\\\node.exe" "E:\\node\\node_modu ...
- 解决npm安装模块时 npm err! registry error parsing json
最近还真是点背,从yeoman生成一个react项目或是github上克隆一个项目,在npm install的时候, 一直报npm err! registry error parsing json(就 ...
随机推荐
- IdentityServer4系列 | 授权码模式
一.前言 在上一篇关于简化模式中,通过客户端以浏览器的形式请求IdentityServer服务获取访问令牌,从而请求获取受保护的资源,但由于token携带在url中,安全性方面不能保证.因此,我们可以 ...
- C#.NET 强大的LINQ
LINQ 是 Language INtegrated Query 单词的首字母缩写,翻译过来是语言集成查询.它为查询跨各种数据源和格式的数据提供了一致的模型,所以叫集成查询.由于这种查询并没有制造新的 ...
- msql语句
表相关语句: 创表相关 CREATE TABLE `Student`( `s_id` VARCHAR(20), `s_name` VARCHAR(20) NOT NULL DEFAULT '', `s ...
- PyQt(Python+Qt)学习随笔:Qt Designer组件属性编辑界面中对话窗QDialog的modal属性
modal属性表示窗口执行show()操作时是以模态窗口还是非模态窗口形式展示,缺省为False,设置该值与QWidget.windowModality的值设置为 Qt.ApplicationModa ...
- PyQt(Python+Qt)学习随笔:desktop的frameGeometry、frameSize、availableGeometry,screenGeometry
frameGeometry:返回窗口相对于父窗口的几何形状的大小,包括窗口的框架,当窗口是顶级窗口时,返回的实际上是屏幕的大小: frameSize:返回窗口的几何形状的大小,包括窗口的框架,当窗口是 ...
- linux进程管理(linux命令安装、进程生命周期、进程状态)
1 linux下如何杀掉进程 1)找到包名所占用的端口: ps aux | grep cbs_portal-1.0.1.jar(包名) 2)杀掉进程: kill 10942(端口号) PS: //-- ...
- 事后Postmortem会议
会议图片 一.设想和目标 1. 我们的软件要解决什么问题?是否定义得很清楚?是否对典型用户和典型场景有清晰的描述? 我的软件是要建立一个失物招领网站,是一个为校园里的失误招领工作提供便利的平台.我们对 ...
- Python 表达式 i += x 与 i = i + x 等价吗?
Python 表达式 i += x 与 i = i + x 等价吗? 看个例子 a = [1, 2, 3] b = a # 写法一 b += [4] # 写法二 # b = b + [4] print ...
- 如何使用交易开拓者(TB)开发数字货币策略
更多精彩内容,欢迎关注公众号:数量技术宅.想要获取本期分享的完整策略代码,请加技术宅微信:sljsz01 为何使用交易开拓者(TB)作为回测工具 交易开拓者(后文以TB简称)是一个支持国内期货市场K线 ...
- PDF格式分析
系列文章是csdn作者'秋风之刀'写的,我只是把目录列出来而已,感谢作者辛苦付出. PDF格式分析(一)简介 PDF格式分析(二)语法之对象 PDF格式分析(三)语法之Filter PDF格式分析(四 ...