1.打印錯誤: error: Unexpected console statement (no-console) at
解決時間:20190612
網(wǎng)上很多解決辦法不靠譜捧请,還麻煩慎璧,最簡單的解決方法是:
在package.json 文件中挤忙,搜索 "eslintConfig",在其下的"rules"中添加以下配置:
"rules": {
"no-console":"off"
},
屏幕快照 2019-06-12 下午6.20.20.png
2.Vue編譯文件上傳服務器刷新頁面404:
錯誤示例.png
第一種解決方法:router中不使用'history'模式
第二種解決方法:在服務器上存放Vue編譯結(jié)果文件的目錄下新增一個 WEB-INF 文件夾,文件夾中新增 web.xml 文件送浊,文件內(nèi)容如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
<error-page>
<error-code>404</error-code>
<location>/</location>
</error-page>
</web-app>
截屏2020-04-30下午4.16.21.png