vue(^2.2.6)使用axios(^0.16.1),webpack热加载的时候报警告

发布于 2022-09-04 23:27:03 字数 1321 浏览 23 评论 0

集成axios的时候热加载报警告,之前用的vue热加载一直没警告,集成了axios之后就开始有警告。
警告如下:

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other c
ase-semantic.
Use equal casing. Compare these module identifiers:
* E:\Githome\github\ebook-vue\node_modules\._webpack@2.5.1@webpack\buildin\globa
l.js
    Used by 1 module(s), i. e.
    E:\Githome\github\ebook-vue\node_modules\._buffer@4.9.1@buffer\index.js
* e:\Githome\github\ebook-vue\node_modules\._webpack@2.5.1@webpack\buildin\globa
l.js
    Used by 1 module(s), i. e.
    e:\Githome\github\ebook-vue\node_modules\._vue@2.3.3@vue\dist\vue.esm.js

图片描述

浏览器访问都正常。但是也有警告:
图片描述

集成的过程就是安装了axios(npm i axios --save-dev)然后使用

import axios from 'axios';


export const getHomePage = params => {
  return axios.get(`/api/v1/**/homepage`, {params: params})
    .then(res => {
      if(res.data.code == 200){
        return res.data.value
      }else {
        
      }
    })
};

不知道为什么 ,求教·····

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

予囚 2022-09-11 23:27:03

我遇到很多次了,每次都需要删掉node_module文件夹才好的。。
但是我后来发现,不管他,可能明天启动他就自己好了。。。

七分※倦醒 2022-09-11 23:27:03

楼主现在解决这个问题了没?我也遇到这个问题了.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文