-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"There are multiple modules with names that only differ in casing" #926
Comments
Same here |
me too ㅠㅠ |
If u use VS Code try change path to project from in @dyh333 case fix: |
/\ this is an OS (windows) problem. Please see the solution above via @Junik |
@gdi2290 well, there are lots of us... |
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 |
On Windows, stop naming files with upper case. Here we use kebab case |
I'm having almost the same warning except it's in Mac: WARNING in ./~/rxjs/add/operator/map.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/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/string-replace-loader/index.js?{"search":"var sourceMappingUrl = extractSourceMappingUrl\\(cssText\\);","replace":"var sourceMappingUrl = \"\";","flags":"g"}!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/Rxjs/add/operator/map.js
Used by 1 module(s), i. e.
/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/string-replace-loader/index.js?{"search":"var sourceMappingUrl = extractSourceMappingUrl\\(cssText\\);","replace":"var sourceMappingUrl = \"\";","flags":"g"}!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/Rxjs/Rx.js
* /Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/string-replace-loader/index.js?{"search":"var sourceMappingUrl = extractSourceMappingUrl\\(cssText\\);","replace":"var sourceMappingUrl = \"\";","flags":"g"}!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/rxjs/add/operator/map.js
Used by 1 module(s), i. e.
/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/@angularclass/hmr-loader/index.js?pretty=true&prod=false!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/awesome-typescript-loader/dist/entry.js!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/angular2-template-loader/index.js!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/node_modules/string-replace-loader/index.js?{"search":"(System|SystemJS)(.*[\\n\\r]\\s*\\.|\\.)import\\((.+)\\)","replace":"$1.import($3).then(mod => (mod.__esModule && mod.default) ? mod.default : mod)","flags":"g"}!/Users/aplicaciones2/Documents/Luchillo-tech-showcase/src/vendor.browser.ts 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 |
Ok found my issue, i'm importing like: import { Observable } from 'Rxjs/Observable';
import { Subscription } from 'Rxjs/Subscription';
import 'Rxjs/add/operator/debounceTime';
import 'Rxjs/add/observable/fromEvent'; When it should be like: import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/observable/fromEvent'; Note the upper case R in rxjs. |
@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 |
@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 . Enviroment: MacOS , node 6.9.1 |
In my code I resolved this issue by updating:
|
This is usually a result of a miniscule typo. If you are importing your modules like import angular from 'angular', import React from 'react' => Go through your files and check where you used < from 'React'> or <from 'Angular'> The error descriptions should have been written more clearly, but what I explained has been the cause of my problem each time I for this error on webpack commands. |
@Babazon For me I had capitalized Radium like this: The error went away. |
这个应该是命令行的问题,我也遇到的,我今天改了cmder的启动路径
原来是这个盘符写成小写了,于是我改成大写就好了
|
Looks like anything after @angular in import statements should be in lower case. Sometimes if you type @angular/Core or @angular/Router you may get this error. So check all the places where you have import @angular for incorrect case. To be more specific you may want to check all your import statements and check if it maps to whatever inside the node_modules folder. Please refer above comments "luchillo17 commented on Sep 13, 2016" |
I could resolve the issue after making all folder name small.Earlier I was using camel case and it was failing. |
原来不是我一个人遇到这个问题! |
我也遇到了 发现就是一个import 路径的一个字母大小写写错了。 i got the issue like :
found my issue, i'm importing like: //CourseList the right is like: //CourseList |
1 similar comment
我也遇到了 发现就是一个import 路径的一个字母大小写写错了。 i got the issue like :
found my issue, i'm importing like: //CourseList the right is like: //CourseList |
I also met this problem today. |
@Shenchuanhuan Nice 😄. |
I solved it by using @luchillo17 's method. |
Using react .. It doesn't matter how you type the drive letter .. Any folder in my server directory(including the server directory) should be typed with small letters .. that fixed the warning for me and got a "Compiled Successfully" absolutely every warning came from my "client" directory .. thats on Windows. |
This is not just a windows-issue, I had the same issue on Mac when I wrote: import { Observable } from 'rxjs/Observable'; Notice that I used uppercase "O". I fixed with import { Observable } from 'rxjs/observable'; And it worked :) |
i solved my warning the same as above by removing the file/folder name using capital to lowercase. |
I had this issue on First I noticed that difference in case was in my path to my dev folder, not in app itself
Initially I thought that there is something wrong with Obviously it was wrong and as I opened new console with correct path - everything was fine with my app. So I started to think how could it happen and I found that one of the shortcuts in my environment had wrong target path |
I found this to be the result of a mix of windows and Mac development |
I have the same issue, it came just "out of the blue" without any reason. It worked fine until yesterday evening. Working on Windows 10 with latest node, npm & git bash. It was rather frustrating... Even tried to pull and start from my (original) master branch, it just persists.
|
i have same problem here when i create new react app this is always appear even when i open my old project i already use lowercase and i didnt know how to fix it |
I think the reason is when you cd to the project file ,the name have Capital issue,such as you want to cd to your desktop,you should check the folder name in your computer,lower case or upper case. |
I have same problem here,but I am in Vue O(∩_∩)O. @mengdu 感谢,我也是用的cmder 发现竟然是盘符问题呜呜,给跪了 |
@namdeom it resolve my problem too... |
I solved by moving the files that have the problem into another directory
|
我也遇到这个问题了 There are multiple modules with names that only differ in casing.
应该怎么解决的?? |
我解决了,原来不是盘符原因,只要把文件删除了,然后重新导入就OK。 |
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 :-) |
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. |
WARNING in ./node_modules/@Angular/common/fesm5/http.js
|
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. |
No meu caso eu tinha uma pasta coloquei em minusculo |
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.
|
In my case it was lowercase I changed Windows 10, PowerShell |
thanks. This is my issue. So i can fix. |
Had the same problem in a react project. |
I had the same issue, i just fix renaming the import: Import React, {ReactNode} from 'React'; to Import React, {ReactNode} from 'react; |
I changed my project path |
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:
Used by 2 module(s), i. e.
E:\GitHub\angular2-webpack-starter\node_modules\punycode\punycode.js
Used by 1 module(s), i. e.
e:\GitHub\angular2-webpack-starter\node_modules\rxjs\util\root.js
The text was updated successfully, but these errors were encountered: