npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp

简介: npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp

当我们使用vue-cli脚手架创建项目的时候,出现了这的问题,这是npm下载出错了。

1.png

错误提示:


Vue CLI v4.5.9
  Creating project in C:\Users\lenovo\Desktop\ffff\hello.
  Installing CLI plugins. This might take a while...
npm ERR! Unexpected end of JSON input while parsing near '...":"^1.2.0","vue-html-'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-12-14T13_40_02_550Z-debug.log
 ERROR  command failed: npm install --loglevel error

解决办法:

注意:以管理员身份运行cmd,输入下面的指令。

1.清除缓存


npm cache clean --force


2.重新安装


npm install

相关文章
|
5月前
|
缓存
npm install 报 npm ERR! cb()never called!的错误
npm install 报 npm ERR! cb()never called!的错误
613 0
|
2天前
|
移动开发 前端开发 JavaScript
HTML5 新的 Input可以有哪些好玩的应用
HTML5的新输入类型为应用带来了多种创新和互动功能,显著提升了用户体验和界面趣味性。例如,颜色选择器可动态改变网站主题色;滑块控制适用于音量或亮度调节;日期和时间输入便于预约系统的设计;互动式表单结合多种输入类型实现高效的数据收集;猜数字游戏增加用户参与度;实时搜索建议优化网站搜索功能;图像预览功能让用户上传图片前预览效果;密码可见性切换按钮提升表单的可用性;结合用户位置的电话号码输入则能提供附近服务信息。这些应用场景不仅使网站更具吸引力,还增强了用户的互动体验。
|
2天前
|
移动开发 数据安全/隐私保护 UED
HTML5 新的 Input 类型详解
HTML5引入了多种新输入类型,显著提升了表单的用户体验和可用性。这些类型包括普通文本、搜索、电子邮件、网址、电话号码、密码、数字、范围选择、日期、时间、颜色选择等,每个类型都有特定用途和优化功能。例如,`email` 类型可自动验证邮件格式,`number` 类型提供增减按钮,而 `date` 类型则内置日期选择器。这些新类型不仅简化了用户操作,还增强了开发者对表单验证和数据交互的控制能力。
|
2月前
|
缓存
成功解决:Could not resolve dependency: npm ERR! peer vue@“^3.0.2“ from vuex@4.0.2
这篇文章讨论了在使用npm安装依赖时遇到的一个常见问题,即无法解析依赖导致的"peer dependency"冲突错误。文章提供了几种解决方法,包括清除npm缓存、删除`node_modules`文件夹和`package-lock.json`文件,然后重新尝试安装,以解决版本冲突问题。
|
2月前
|
JSON JavaScript 前端开发
Unexpected token u in JSON at position 0
这篇文章解释了JavaScript中"Unexpected token u in JSON at position 0"错误的常见原因,通常是由于尝试解析undefined变量导致的,并建议检查是否有变量在JSON.parse()执行时未赋值或值为undefined。
Unexpected token u in JSON at position 0
|
2月前
|
缓存
Node——npm ERR! cb() never called!
Node——npm ERR! cb() never called!
43 0
|
4月前
npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!-解决
npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!-解决
|
3月前
|
JSON Java 数据格式
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
|
4月前
|
缓存
html input 如何设置禁止缓存历史记录
html input 如何设置禁止缓存历史记录
98 0
|
5月前
使用npm install时遇到问题:npm ERR! code ERESOLVE
使用npm install时遇到问题:npm ERR! code ERESOLVE

推荐镜像

更多
下一篇
无影云桌面