centos下载报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlis

Posted hkgan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos下载报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlis相关的知识,希望对你有一定的参考价值。

  ✨在学习使用 docker 技术过程中,基于 centos 镜像自定义新的镜像,其中基础镜像 centos 需要提前安装好 vim 和 net-tools,然而在刚开始通过 yum -y install vim 安装 vim 时,便出现了错误提示信息:

Error: Failed to download metadata for repo \'appstream\': Cannot prepare internal mirrorlist: No URLs in mirrorlist

  ✨上面的报错信息意思是,从仓库 ‘appstream’ 下载元数据失败:由于镜像列表中没有 URL,不能准备内部镜像列表。

Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示

在创建一个vue项目启动时报错,报错的内容为: 
error in ./src/App.vue

Module build failed: Error: No parser and no file path given, couldn’t infer a p 
arser. 
at UndefinedParserError.Wrapper (D:\dyyc\bookstore\[email protected] 
[email protected]\index.js:1948:14) 
at new UndefinedParserError (D:\dyyc\bookstore\[email protected] 
@prettier\index.js:2055:83) 
at normalize (D:\dyyc\bookstore\[email protected]@prettier\index 
.js:7051:13) 
at formatWithCursor (D:\dyyc\bookstore\[email protected]@prettie 
r\index.js:10370:12) 
at D:\dyyc\bookstore\[email protected]@prettier\index.js:31115:1 

at Object.format (D:\dyyc\bookstore\[email protected]@prettier\i 
ndex.js:31134:12) 
at Object.module.exports (D:\dyyc\bookstore\[email protected]
vue-loader\lib\template-compiler\index.js:80:23)

@ ./src/App.vue 11:0-392 
@ ./src/main.js 
@ multi ./node_modules/[email protected]@webpack-dev-server/client?htt 
p://localhost:8082 webpack/hot/dev-server ./src/main.js

 

原因是prettier 更新到1.13.1导致的,component-compiler-utils 1.3.1 已经更新修复了.

【解决方法】:

1、node_modules下面的[email protected]@prettier文件夹删除

2、控制台安装  cnpm install --save-dev [email protected]

3、控制台运行 cnpm run dev

以上是关于centos下载报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlis的主要内容,如果未能解决你的问题,请参考以下文章

centos 报错 “Job for iptables.service failed because the control process exited with error code.”的解决办法

mongodb使用mongo报错: Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed:

Centos7 网络报错Job for iptables.service failed because the control process exited with error code.

centos 升级 glibc和glibcxxx ,解决error: Failed dependencies等问题

Vue报错Module build failed: Error: No parser and no file path given, couldn't infer a p arser.(示

启动Sonar报错,ERROR: [1] bootstrap checks failed [1]: system call filters failed to install