"There are multiple modules with names that only differ in casing"
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
Same here
me too ㅠㅠ
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
/\ 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 string-replace-loader used in the preLoader config in the webpack.common.js file is responsible for that issue.
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 https://github.com/nodejs/node/issues/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:
import { Component, OnInit } from '@angular/Core'
to
import { Component, OnInit } from '@angular/core'
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: import Radium from 'Radium' when I should have imported it like this: import Radium from 'radium'
The error went away.
这个应该是命令行的问题,我也遇到的,我今天改了cmder的启动路径
cmd /k "%ConEmuDir%\..\init.bat" -new_console:d:e:\
然后也出现了类似的问题
* E:\lanyue\vue\admin-customer\node_modules\.2.2.1@webpack\buildin\global.js
Used by 1 module(s), i. e.
E:\lanyue\vue\admin-customer\node_modules\.2.2.1@vue\dist\vue.esm.js
* e:\lanyue\vue\admin-customer\node_modules\.2.2.1@webpack\buildin\global.js
Used by 2 module(s), i. e.
e:\lanyue\vue\admin-customer\node_modules\echarts\lib\echarts.js
原来是这个盘符写成小写了,于是我改成大写就好了
cmd /k "%ConEmuDir%\..\init.bat" -new_console:d:E:\
Looks like anything after @angular in import statements should be in lower case. e.g. @angular/core, @angular/router
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 :
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/fydor/Desktop/work/CongZhi/wex-front/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/fydor/Desktop/work/CongZhi/wex-front/app/component/Course/CourseList.jsx
Used by 1 module(s), i. e.
/Users/fydor/Desktop/work/CongZhi/wex-front/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/fydor/Desktop/work/CongZhi/wex-front/app/component/Course/CourseMore.jsx
* /Users/fydor/Desktop/work/CongZhi/wex-front/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/fydor/Desktop/work/CongZhi/wex-front/app/component/course/CourseList.jsx
Used by 3 module(s), i. e.
/Users/fydor/Desktop/work/CongZhi/wex-front/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/fydor/Desktop/work/CongZhi/wex-front/app/component/home/Home.jsx
found my issue, i'm importing like:
//CourseList import CourseMore from './component/Course/CourseMore.jsx';
the right is like:
//CourseList import CourseMore from './component/course/CourseMore.jsx'; due to the 'c'