2017-11-28 6 views
1

:웹팩 : "거기에만 케이스에 다른 이름을 가진 여러 개의 모듈은"하지만 참조 모듈은 동일 내가 웹팩 3.8.1을 사용하고 있는데 다음과 같은 빌드 경고의 여러 인스턴스 수신하고

WARNING in ./src/Components/NavBar/MainMenuItemMobile.js 
There are multiple modules with names that only differ in casing. 
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. 
Use equal casing. Compare these module identifiers: 
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/MainMenuItemMobile.js 
    Used by 1 module(s), i. e. 
    /Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/ConstructedMainMenuItems.js 
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/MainMenuItemMobile.js 
    Used by 1 module(s), i. e. 
    /Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/ConstructedMainMenuItems.js 
..... 
(webpack)-hot-middleware/client.js ./src/index.js 

은 무엇을 혼란스러운 것은 참조 된 '2 개의'파일이 단지 하나의 파일이라는 점입니다. 이름이 대소 문자 만 다른 두 개의 파일이 디렉토리에 없습니다.

또한이 경고의 영향을받는 핫 리퍼가 파일을 변경하지 않는 경우가 종종 있습니다.

이 문제의 원인은 무엇입니까?

답변

3

이것은 대개 오판자의 소문자입니다.

모듈을 가져 오는 경우 import Vue from 'vue', import Vuex from 'vuex'.

이 파일을 통해 가서 from 'Vue' 또는 from 'Vuex' 오류 설명이 더 명확하게 작성되어 있어야합니다

을 사용하는 경우 확인하지만, 제가 설명하는 것은 웹팩 명령에이 오류에 대한 때마다 내 문제의 원인이되고있다.

+0

맞아요, 모듈 이름이 아닌 경로 이름이었습니다. 그래서 저를 던졌습니다. 나는 NavBar/MainMenuItemMobile.js가 있습니다. Navbar의 'b'는 소문자 여야합니다. – adc17