mac电脑直接:

rm -rf node_modules
rm package-lock.json
npm install
npm install prettier@~1.12.1

执行完这四个命令,保证ok

win电脑

先手动卸载了本地的prettier
然后再npm install prettier@~1.12.1

原因是因为mac的node_moduls中的包命名直接为该组件的名字,而win要携带版本号
所以mac执行npm install prettier时会覆盖原来的版本,而win则不会,因为win的
文件夹命名格式为prettier@1.12.1或者prettier@1.13.0,所以需要手动卸载一下

vue2018年5月报错No parser and no file path given的更多相关文章

  1. vue-cli 报Module build failed: Error: No parser and no file path given, couldn't infer a parser.错的解决方法

    出错提示如下: ERROR Failed to compile with errors :: error in ./src/App.vue Module build failed: Error: No ...

  2. vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.

    ERROR Failed to compile with 2 errors 12:00:33 error in ./src/App.vue Module build failed: Error: No ...

  3. scp报错:not a regular file,解决方法:加参数 -r

    命令:scp  -P1234  /data/aa   root@192.0.0..0:/data 文件结构:/data/aa/yearmonth=2015-09 报错:not a regular fi ...

  4. ORA-01157报错"cannot identify/lock data file"解决

    sqlplus以管理员方式接入数据库,启动时出现报错,如下: > sqlplus "/as sysdba" SQL> startup ...... ORA-01157: ...

  5. eclipse发布项目报错:Multiple Contexts hava a path of “/xxx“

    你的位置:首页 > Java编程 > eclipse发布项目报错:Multiple Contexts hava a path of “/xxx“ eclipse发布项目报错:Multipl ...

  6. 写交互式脚本时,遇到到报错:not a regular file

    场景:在写两台ubuntu之间需要交互式登录操作shell脚本.就是在ubantu A上,做点什么事,然后远程到ubuntu B上进行操作,shell脚本存放在ubuntu A上. 我遇到这个报错:n ...

  7. 抓取https网页时,报错sun.security.validator.ValidatorException: PKIX path building failed 解决办法

    抓取https网页时,报错sun.security.validator.ValidatorException: PKIX path building failed 解决办法 原因是https证书问题, ...

  8. Mac 升级后idea执行git命令报错xcrun: error: invalid active developer path的解决办法

    报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...

  9. mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero

    .bin/mysqld --initialize-insecure --basedir=xxx --datadir=xxx 然后 .bin/mysqld_safe --defaults-file=xx ...

随机推荐

  1. pthread 的几个结构体

    http://blog.csdn.net/yangzhongxuan/article/details/7397139 /* Copyright (C) 2002,2003,2004,2005,2006 ...

  2. 【[HEOI2016/TJOI2016]游戏】

    据说是网络流棋盘模型了 我们把每一个连续子段都看成一个点,我们先把所有的行上的连续子段找出来给他们编上号,所有列上的连续子段找出来也编上号 现在每个格子都有两个编号了,\(a[i][j]\)表示行所对 ...

  3. Codeforces Round #515 (Div. 3) B. Heaters【 贪心 区间合并细节 】

    任意门:http://codeforces.com/contest/1066/problem/B B. Heaters time limit per test 1 second memory limi ...

  4. Java从入门到放弃——01.Java 环境搭建

    本文目标: 下载与安装JDK 配置Java环境 1.JDK9下载:  下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jav ...

  5. 活到老学到老:iOS开发中的基础知识(一)

    本文参考 标哥的博客:宝库iOS开发笔试题 进行学习整理.与其说是看面试题,不如说是对自己知识的巩固.工欲善其事必先利其器,基础知识不牢固可能会导致编程中的一些注意不到的问题.总之一句话:活到老,学到 ...

  6. HDU 1071 The area(求三个点确定的抛物线的面积,其中一个点是顶点)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1071 The area Time Limit: 2000/1000 MS (Java/Others)  ...

  7. WSASocket()与Socket()的区别 转

    /**************************************************** WSASocket是Windows专用,支持异步操作:socket是unix标准,只能同步操 ...

  8. 解决div+img布局下img下端出现空白的bug

    1.将图片转换为块级对象 即设置img为“display:block;”.在本例中添加一组CSS代码:“#sub img {display:block;}”. 2.设置图片的垂直对齐方式 即设置图片的 ...

  9. 经验之谈—控制器的view的显示

    经验之谈—控制器的view的显示 开发中,我们经常需要将一个控制器的view添加到另一个控制器的view上,这种效果是我们期望看到的,但是里边隐藏着一些细节,不注意的话,可能会达不到我们想到的效果. ...

  10. Xadmin使用二

    1:修改site-title和site-footer,增加菜单折叠效果 在adminx.py中增加下面代码: class GlobalSetting(object): # 设置Title site_t ...