1.Eslint js代码规范报错

 WARNING  Compiled with 2 warnings                                      10:43:26

  ✘  http://eslint.org/docs/rules/quotes                       Strings must use singlequote
src/components/HelloWorld.vue:43:9
name: "HelloWorld",
^ ✘ http://eslint.org/docs/rules/space-before-function-paren Missing space before function parentheses
src/components/HelloWorld.vue:44:7
data() {
^ ✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src/components/HelloWorld.vue:46:12
msg: "Welcome to Your Vue.js App"
^ ✘ http://eslint.org/docs/rules/semi Extra semicolon
src/components/HelloWorld.vue:47:6
};
^ ✘ http://eslint.org/docs/rules/semi Extra semicolon
src/components/HelloWorld.vue:49:2
};
^ ✘ 5 problems (5 errors, 0 warnings) Errors:
2 http://eslint.org/docs/rules/quotes
2 http://eslint.org/docs/rules/semi
1 http://eslint.org/docs/rules/space-before-function-paren ✘ http://eslint.org/docs/rules/quotes Strings must use singlequote
src/App.vue:43:9
name: "App"
^ ✘ http://eslint.org/docs/rules/semi Extra semicolon
src/App.vue:44:2
};
^ ✘ 2 problems (2 errors, 0 warnings) Errors:
1 http://eslint.org/docs/rules/quotes
1 http://eslint.org/docs/rules/semi You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

出现这种问题是由于在bulid/webpack.base.conf.js里面有如下的配置:

rules: [
...
(config.dev.useEslint ? [createLintingRule()] : []),

解决这个问题也很简单,点进config.dev.useEslint,发现在config/index.js里配置

useEslint: true, // 改为false即可。

2.引入element ui框架出现的问题





出现这种错误的原因是没有把element ui下载到该项目路径下,所以在用npm或者淘宝镜像cnpm下载时,终端必须在该项目路径下打开,然后就可以顺利解决这个错误了

vue.js---利用vue cli脚手架工具+webpack创建项目遇到的坑的更多相关文章

  1. vue.js利用vue.router创建前端路由

    node.js方式: 利用node.js安装vue-router模块 cnpm install vue-router 安装完成后我们引入这个模板! 下载vue-router利用script引入方式: ...

  2. vue- Vue-Cli脚手架工具安装 -创建项目-页面开发流程-组件生命周期- -03

    目录 Vue-Cli 项目环境搭建 与 python 基础环境对比 环境搭建 创建启动 vue 项目 命令创建项目(步骤小多) 启动 vue 项目(命令行方式) 启动 vue 项目(pycharm 方 ...

  3. httprunner_安装及利用脚手架工具快速创建项目

    一.安装httprunner 笔者自己安装的版本为2.5.7 安装命令: pip  install httprunner==2.5.7 二.快速创建目录 hrun --startproject dem ...

  4. Vue.js——60分钟快速入门 开发· webpack 中文文档

    转载于:http://www.cnblogs.com/keepfool/p/5619070.html http://www.css88.com/doc/webpack2/guides/get-star ...

  5. 用commander.js构建自己的脚手架工具

    随着前端技术的发展,工程化逐渐成为了一种趋势.但在实际开发时,搭建项目是一件很繁琐的事情,尤其是在对一个框架的用法还不熟悉的时候.于是很多框架都自带一套脚手架工具,在初始化前端项目的时候就可以不用自己 ...

  6. Vue.js起手式+Vue小作品实战

    本文是小羊根据Vue.js文档进行解读的第一篇文章,主要内容涵盖Vue.js的基础部分的知识的,文章顺序基本按照官方文档的顺序,每个知识点现附上代码,然后根据代码给予个人的一些理解,最后还放上在线编辑 ...

  7. js 引入Vue.js实现vue效果

    拆分组件为单个js见:https://www.jianshu.com/p/2f0335818ceb 效果 html <!DOCTYPE html> <html> <hea ...

  8. mac下配置Node.js开发环境、express安装、创建项目

    mac下配置Node.js开发环境.express安装.创建项目 一.node.js的安装 去官网下载对应的平台版本就可以了,https://nodejs.org 二.express安装 sudo n ...

  9. maven这些工具负责创建项目,然后maven负责打包好war包扔进tomcat容器,tomcat容器接受的只是jar包

    maven这些工具负责创建项目,然后maven负责打包好war包扔进tomcat容器,tomcat容器接受的只是jar包 2.tomcat不管你什么编译的,也不管你开发工具是什么.Tomcat只接受w ...

随机推荐

  1. HDU 3008 DP

    基础DP题 打BOSS  BOSS和自己都有100点血.玩家先手 每回合能够选择施放技能攻击(耗蓝,共n种)或者普通攻击(不耗蓝,伤害为1),BOSS每回合会攻击自己q点血,每回合自己会恢复t点法力 ...

  2. Solr基础教程之solrconfig.xml(三)

    前面介绍过schema.xml的一些配置信息,本章介绍solrconfig.xml的配置,以及怎样安装smartcn分词器和IK分词器,并介绍主要的查询语法. 1. solr配置solrconfig. ...

  3. nyoj27水池数目 (DFS)

    题目27 题目信息 执行结果 本题排行 pid=27" style="text-decoration:none; color:rgb(55,119,188)">讨论 ...

  4. ios MetalPerformanceShaders 使用总结

    MPSCNNConvolution 1.初始化时传人 UnsafePointer<Float> 时要传入w,不能是 &(w[0]).否则w其实传入失败,卷积的结果是nan或inf. ...

  5. android TextView不用ScrollViewe也可以滚动的方法

    TextView textview = (TextView) findViewById(R.id.text); /** * * 只有调用了该方法,TextView才能不依赖于ScrollView而实现 ...

  6. How do browser cookie domains work?

    https://stackoverflow.com/questions/1062963/how-do-browser-cookie-domains-work 答案一 Although there is ...

  7. 面向画布(Canvas)的JavaScript库

    面向画布(Canvas)的JavaScript库 总结 每个库各有特色,根据需求选择   学习要点 面向画布(Canvas)的JavaScript库 EaselJS 是一个封装了 HTML5 画布(C ...

  8. go语言笔记——map map 默认是无序的,不管是按照 key 还是按照 value 默认都不排序

    示例 8.1 make_maps.go package main import "fmt" func main() { var mapLit map[string]int //va ...

  9. Black Rock Shooter

    在人气动漫 Black Rock shooter 中,当加贺里对麻陶 说出了"滚回去"以后,与此同时,在另一个心灵世界里, BRS 也遭到了敌人的攻击.此时,一共有 n 个攻击排成 ...

  10. Rails5 Controller Document

    更新: 2017/06/28 大致完成全部 更新: 2017/06/29 补充module文件命名规则 更新: 2017/07/09 补充session的设置 更新: 2018/03/06 修正ren ...