You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"There are multiple modules with names that only differ in casing" #926
i cloned one project to local and npm install, npm start. but found below warning.
my dev environment is in windows 10 system
WARNING in (webpack)/buildin/module.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:
E:\GitHub\angular2-webpack-starter\node_modules\webpack\buildin\module.js
Used by 2 module(s), i. e.
E:\GitHub\angular2-webpack-starter\node_modules\punycode\punycode.js
e:\GitHub\angular2-webpack-starter\node_modules\webpack\buildin\module.js
Used by 1 module(s), i. e.
e:\GitHub\angular2-webpack-starter\node_modules\rxjs\util\root.js
If u use VS Code try change path to project from
c:[path to angular2-webpack-starter]
to
C:[path to angular2-webpack-starter]
in @dyh333 case fix: e:\GitHub\angular2-webpack-starter> cd E:\GitHub\angular2-webpack-starter npm start
in your terminal or cli
Reacted by Ezequiel Perez, Deveedutta (Suspended), Ben Thompson, Matt Dell, Valerio Cestrone, Yasin Shtiui, zzcb337, trsdesign, Julio Cezar Silva, Craig Ayre and 29 more
Reacted by Kuldip Barot, Aiyoub Amini and transtone
Reacted by k49a, Khris and Souvik Nath
Reacted by Manohar Reddy Poreddy
Reacted by Neal van der Valk, Bhumesh Domala, Peter Babukh, Kevin Ng Ying Yi, k49a and Manohar Reddy Poreddy
That one error is repeated aprox 52 times with different rxjs operators.
So as this happens to me in Mac OSX 'El Capitan', i don't think my issue is with the cd used, any ideas?
Update: After some digging it happens whenever i import the Rxjs Observable, it seems the string-replace-loader used in the preLoader config in the webpack.common.js file is responsible for that issue.
Reacted by Deveedutta (Suspended), Rohman Muhammad, Olivier Amblet, Burke Holland, Benjamin Zhang and Sachin
Reacted by Mugo Petersen, Adam Faryna, Trevor Hackett, Yami Odymel, Reiss Cashmore, Mehdi Saeedifar, Alexander Kalitenya, Praym, Theo Meneau, Benjamin B and 130 more
Reacted by Brian O Grady, Alexandre, Manjit Kumar, Kuldip Barot, Juan Herrera, Derek Braid , Morris Ballenger, explorer, H, Maks and 12 more
Reacted by Juan Manuel, Trevor Hackett, Yami Odymel, kaskazurek, Mehdi Saeedifar, Reunan Le noc, Brian O Grady, Alexandre, Manjit Kumar, Alexander Pekkari and 22 more
Reacted by Kuldip Barot, Ramprit Sahani, Benjamin Zhang, 루덴(ruden.91), JaLe, Omar Habash, ashithrahul and Letícia Cavalcanti
Reacted by Jiangning, 陶吉诃德, fahadrehman, dietergoetelen, Michael McGee, Roman Holovatyi, Maks, abdi-mohamed, 루덴(ruden.91), VaishNathani and 12 more
@Junik this fix didn't work for me as my path was already set with an upper case drive letter. Is the casing in the path critical as well? I have mixed case in the folders of the path to my project directory.
@buddyackerman I just ran into this on one of my machines and realized I was using Node 6.4, I upgraded to 7.1 and the issues went away, could of been the way I was doing the directory as well, but I believe this has been fixed on the Node end (see nodejs/node#6624)
I've encountered this issue today , I solve by checking the import components url . In my case is XXX.module.ts & XXX.routing.ts . the url after you import { Anyting } must all in lower case .
我也遇到这个问题了
warning in F:/Web/vue-cli/vue-examplel/node_modules/webpack/buildin/global.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:
F:\Web\vue-cli\vue-examplel\node_modules\webpack\buildin\global.js
Used by 2 module(s), i. e.
F:\Web\vue-cli\vue-examplel\node_modules_sockjs-client@1.1.4@sockjs-client\dist\sockjs.js
f:\Web\vue-cli\vue-examplel\node_modules\webpack\buildin\global.js
Used by 1 module(s), i. e.
f:\Web\vue-cli\vue-examplel\node_modules\vue\dist\vue.esm.js
Simply if you capitalize a file name that is already imported in ather files of you project, node js explodes. It become creazy. I returned the file name to lowercase and node js is returned to run happily :-)
WARNING in ./node_modules/@Angular/common/fesm5/http.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:
F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@Angular\common\fesm5\http.js
Used by 16 module(s), i. e.
F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@ngtools\webpack\src\index.js!F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\src\app\app.module.ts* F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@angular\common\fesm5\http.js
Used by 4 module(s), i. e.
F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@ngtools\webpack\src\index.js!F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\src\app\Services\SubCategoryService\sub-category-master.service.ts
i am also encountering this problem.. i have services to post and get, two of them are working fine but others are not and showing 400 bad request ... but nothing is wrong in the code..i think i am encountering unexpected behavior while compiling,i am posting other service and the source is showing other html and hence giving 400 bad request.
Webpack shows a warning "There are multiple modules with names that only differ in casing" when executed from a terminal of VSCode on Windows, and a default shell of a Terminal is "Command prompt", which uses small letters for drive names.
Solution:
I changed my project path
ex: C:\Users\name\documents\project\ to C:\Users\name\Documents\Project
Check for the original format in the folder location and try changing it.
Activity
inska commentedon Sep 1, 2016
Same here
junyun0516 commentedon Sep 5, 2016
me too ㅠㅠ
Junik commentedon Sep 7, 2016
If u use VS Code try change path to project from
c:[path to angular2-webpack-starter]
to
C:[path to angular2-webpack-starter]
in @dyh333 case fix:
e:\GitHub\angular2-webpack-starter> cd E:\GitHub\angular2-webpack-starternpm startin your terminal or cli
PatrickJS commentedon Sep 9, 2016
/\ this is an OS (windows) problem. Please see the solution above via @Junik
alvipeo commentedon Sep 9, 2016
@gdi2290 well, there are lots of us...
PatrickJS commentedon Sep 9, 2016
this is a problem with node.js and windows so I can't do anything about it. you just need to make sure you cd with the correct path
aminebizid commentedon Sep 9, 2016
On Windows, stop naming files with upper case. Here we use kebab case
luchillo17 commentedon Sep 13, 2016
I'm having almost the same warning except it's in Mac:
That one error is repeated aprox 52 times with different rxjs operators.
So as this happens to me in Mac OSX 'El Capitan', i don't think my issue is with the cd used, any ideas?
Update: After some digging it happens whenever i import the Rxjs Observable, it seems the
string-replace-loaderused in thepreLoaderconfig in thewebpack.common.jsfile is responsible for that issue.luchillo17 commentedon Sep 13, 2016
Ok found my issue, i'm importing like:
When it should be like:
Note the upper case R in rxjs.
buddyackerman commentedon Oct 31, 2016
@Junik this fix didn't work for me as my path was already set with an upper case drive letter. Is the casing in the path critical as well? I have mixed case in the folders of the path to my project directory.
e.g. C:\Projects\Angular2\Blah\MyProject
MarkPieszak commentedon Nov 18, 2016
@buddyackerman I just ran into this on one of my machines and realized I was using Node 6.4, I upgraded to 7.1 and the issues went away, could of been the way I was doing the directory as well, but I believe this has been fixed on the Node end (see nodejs/node#6624)
karocksjoelee commentedon Jan 12, 2017
I've encountered this issue today , I solve by checking the import components url . In my case is XXX.module.ts & XXX.routing.ts . the url after you import { Anyting } must all in lower case .
Enviroment: MacOS , node 6.9.1
30 remaining items
wenxiayili commentedon Apr 11, 2018
@namdeom it resolve my problem too...
zhuy2018 commentedon Jul 5, 2018
我也遇到这个问题了
warning in F:/Web/vue-cli/vue-examplel/node_modules/webpack/buildin/global.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:
Used by 2 module(s), i. e.
F:\Web\vue-cli\vue-examplel\node_modules_sockjs-client@1.1.4@sockjs-client\dist\sockjs.js
Used by 1 module(s), i. e.
f:\Web\vue-cli\vue-examplel\node_modules\vue\dist\vue.esm.js
应该怎么解决的??
zhuy2018 commentedon Jul 5, 2018
我解决了,原来不是盘符原因,只要把文件删除了,然后重新导入就OK。
这坑踩的深,后面人跳过此坑!!!!!!!
PietroLaGrotta commentedon Sep 7, 2018
Simply if you capitalize a file name that is already imported in ather files of you project, node js explodes. It become creazy. I returned the file name to lowercase and node js is returned to run happily :-)
davidqqq commentedon Nov 12, 2018
This tip actually helped me and would like to translate in English to help people who might need it.
Here it goes:
I solved it. It wasn't caused by drive letter. Remove the problematic file and reimport it. It should be OK now.
Tech007Harsh commentedon Feb 4, 2019
WARNING in ./node_modules/@Angular/common/fesm5/http.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:
Used by 16 module(s), i. e.
F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@ngtools\webpack\src\index.js!F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\src\app\app.module.ts* F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@angular\common\fesm5\http.js
Used by 4 module(s), i. e.
F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\node_modules@ngtools\webpack\src\index.js!F:\CodeLoverTechnology\Development\Web_Development\NirmanIASWeb\NirmanIASPortal\src\app\Services\SubCategoryService\sub-category-master.service.ts
Tech007Harsh commentedon Feb 4, 2019
i am also encountering this problem.. i have services to post and get, two of them are working fine but others are not and showing 400 bad request ... but nothing is wrong in the code..i think i am encountering unexpected behavior while compiling,i am posting other service and the source is showing other html and hence giving 400 bad request.
Isaquedias commentedon May 5, 2019
No meu caso eu tinha uma pasta
/Pages
troquei por
/pages
coloquei em minusculo
ivan-nemtinov commentedon Dec 13, 2019
Webpack shows a warning "There are multiple modules with names that only differ in casing" when executed from a terminal of VSCode on Windows, and a default shell of a Terminal is "Command prompt", which uses small letters for drive names.
Solution:
const-int commentedon May 19, 2020
In my case it was lowercase
userfolder in the path.I changed
C:\users\admin\projecttoC:\Users\admin\projectand it works fine.Windows 10, PowerShell
vuongvgc commentedon May 30, 2020
thanks. This is my issue. So i can fix.
ShahriarKh commentedon May 28, 2021
Had the same problem in a react project.
Solution: I was naming a css file in camelCase 😑
wallace-lw commentedon Jun 13, 2022
I had the same issue, i just fix renaming the import: Import React, {ReactNode} from 'React'; to Import React, {ReactNode} from 'react;
naveenmorla1901 commentedon Mar 13, 2024
I changed my project path
ex: C:\Users\name\documents\project\ to C:\Users\name\Documents\Project
Check for the original format in the folder location and try changing it.