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

相关文章
|
8月前
|
缓存
npm install 报 npm ERR! cb()never called!的错误
npm install 报 npm ERR! cb()never called!的错误
1308 0
|
19天前
|
JavaScript
nodejs安装之npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIRED reason: certificate has expired-证书错误通用问题解决方案-优雅草央千澈
nodejs安装之npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIRED reason: certificate has expired-证书错误通用问题解决方案-优雅草央千澈
|
5月前
|
缓存
成功解决: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`文件,然后重新尝试安装,以解决版本冲突问题。
|
5月前
|
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
|
5月前
|
JavaScript
NodeJs——Parsing error: Cannot read file '.../tsconfig.json'.eslint
NodeJs——Parsing error: Cannot read file '.../tsconfig.json'.eslint
64 0
|
5月前
|
缓存
Node——npm ERR! cb() never called!
Node——npm ERR! cb() never called!
88 0
|
7月前
npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!-解决
npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!-解决
|
6月前
|
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
|
8月前
使用npm install时遇到问题:npm ERR! code ERESOLVE
使用npm install时遇到问题:npm ERR! code ERESOLVE
228 1
|
8月前
|
JSON NoSQL Redis
ruoyi-nbcio发送消息的SerializationException: Could not read JSON: Unexpected character (‘¬‘ (code 172))
ruoyi-nbcio发送消息的SerializationException: Could not read JSON: Unexpected character (‘¬‘ (code 172))
219 0

热门文章

最新文章

推荐镜像

更多