vue.js---利用vue cli脚手架工具+webpack创建项目遇到的坑
2024-10-21 15:42:36
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下载时,终端必须在该项目路径下打开,然后就可以顺利解决这个错误了
最新文章
- Array&;String总结
- input点击链接另一个页面,各种操作
- 手把手教你编写一个具有基本功能的shell(已开源)
- LSB 简介
- Entity Framework(1)
- CentOS 大量的TIME_WAIT解决方法
- js获取域名的方法
- GDB反向调试 + 指令记录+函数历史记录
- python of zip moudle
- Flask Session 详解
- iphone屏幕镜像怎么用 手机投屏电脑
- scrapy入门:安装scrapy
- producer发布消息
- php xml格式对象 返回->;对应格式数组
- hdoj3709(数位dp)
- HTML5 自定义属性
- VGA线 1080P之伤 <;中秋节篇>;
- C#学习笔记(12)——三种方法操作XML
- 【TCP/IP详解 卷一:协议】第9章 IP选路
- SVN使用出现的问题及解决方案
热门文章
- GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0&;#39;错误的解决的方法
- Python3基础(十) 类的初印象
- leetcode第一刷_Spiral Matrix
- 约瑟夫环问题(猴子选大王)PHP版
- BeautifulSoup中各种html解析器的比較及使用
- Codeforces Round #311 (Div. 2)A Ilya and Diplomas
- YTU 2760: 字符串---首字母变大写
- XAML实例教程系列 - XAML传递参数到值转换类实例 八
- 洛谷P2744 [USACO5.3]量取牛奶Milk Measuring
- tinymce 出现 Uncaught (in promise) TypeError: ae(...).createObjectURL is not a function