Vue 项目启动后出现常见的警告 错误解决办法

There are multiple modules with names that only differ in casing.This can lead to unexpected........

在这里插入图片描述
原因:文件名和引用不一致,一个大写字母,一个小写字母,举个例,文件名是App.js,但是你引用的时候是写的app.js
…’@/api/oa/workingHours/aWorkinghoursAllowed/index’; 我把文件名aWorkinghoursallowed写成了aWorkinghoursAllowed,所以才导致出现上面的警告

52:12-24 Critical dependency: the request of a dependency is an expression

在这里插入图片描述
原因:不能在main.js文件中直接定义方法并挂实例的原型上,注释红框部分就解决问题了
刚开始发现问题的时候,弄了好久都没有解决,也百度了好多相关的文章,最后还是没有解决就放弃了,先暂时搁置在那里了
后面项目不忙的时候,就用最蠢的办法一开始把代码全部注释掉,然后一行一行地去测试,结果出乎意料地直接把问题一下子就找出来了

图片找不到 返回状态码 404 (Not Found)

在这里插入图片描述
原因: 引入图片路径写法不对 正确写法如下

1-在data里写入 url:require(’./assets/images/logo.png’)
2-在模板中写入

Request processing failed; nested exception is tk.mybatis.mapper.MapperException: 当前实体类不包含名为rnable的属性!

在这里插入图片描述
原因: 前后台字段名对不上

Error: listen EADDRNOTAVAIL 192.168.1.166:9527
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1245:19)
at listen (net.js:1294:10)
at net.js:1404:9
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3

原因:服务器 IP地址被更改了

Error occured while trying to proxy to: localhost:9527/api//auth/jwt/token 并返回状态码500

在这里插入图片描述
原因:后台服务器没有开启或是断网

猜你喜欢

转载自blog.csdn.net/weixin_41697323/article/details/93025294