angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

warning error

Open NilsHolger opened this issue 9 years ago • 2 comments

Please provide us with the following information: i am a happy user eager to learn and explore angular in the documentation. i decide to use angular-cli. i am aware that cli doesn't like moduleid. i follow the instructions precisely, well as good as i can ...

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) where is android? windows 7.

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here: ANGULAR-CLI: 1.0.0-beta.21 NODE: 7.2.0 os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information. warning: it seems to originate from the awesometypescriptloader client?93b6:73 ./~/rxjs/Observable.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:

  • C:\dev\ng2-tour-of-heroes\node_modules\rxjs\Observable.js Used by 31 module(s), i. e. C:\dev\ng2-tour-of-heroes\node_modules@angular\core\src\facade\async.js
  • C:\dev\ng2-tour-of-heroes\node_modules\rxjs\observable.js Used by 1 module(s), i. e. C:\dev\ng2-tour-of-heroes\node_modules*awesome-typescript-loader*\dist\entry.js?{"forkChecker":true,"tsconfig":"C:\dev\ng2-tour-of-heroes\src\tsconfig.json","externals":["C:/dev/ng2-tour-of-heroes/src/app/app.component.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/app.component.ts","C:/dev/ng2-tour-of-heroes/src/app/app.module.ts","C:/dev/ng2-tour-of-heroes/src/app/app.routing.module.ts","C:/dev/ng2-tour-of-heroes/src/app/dashboard/dashboard.component.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/dashboard/dashboard.component.ts","C:/dev/ng2-tour-of-heroes/src/app/hero-detail/hero-detail.component.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/hero-detail/hero-detail.component.ts","C:/dev/ng2-tour-of-heroes/src/app/hero.service.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/hero.service.ts","C:/dev/ng2-tour-of-heroes/src/app/hero.ts","C:/dev/ng2-tour-of-heroes/src/app/heroes/heroes.component.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/heroes/heroes.component.ts","C:/dev/ng2-tour-of-heroes/src/app/herosearch.service.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/herosearch.service.ts","C:/dev/ng2-tour-of-heroes/src/app/herosearch/herosearch.component.spec.ts","C:/dev/ng2-tour-of-heroes/src/app/herosearch/herosearch.component.ts","C:/dev/ng2-tour-of-heroes/src/app/in-memory-data-service.ts","C:/dev/ng2-tour-of-heroes/src/app/index.ts","C:/dev/ng2-tour-of-heroes/src/app/rxjs-extensions.ts","C:/dev/ng2-tour-of-heroes/src/environments/environment.prod.ts","C:/dev/ng2-tour-of-heroes/src/environments/environment.ts","C:/dev/ng2-tour-of-heroes/src/main.ts","C:/dev/ng2-tour-of-heroes/src/polyfills.ts","C:/dev/ng2-tour-of-heroes/src/test.ts","C:/dev/ng2-tour-of-heroes/src/typings.d.ts"],"doTypeCheck":true,"sourceMap":true,"verbose":false}!C:\dev\ng2-tour-of-heroes\node_modules\angular2-template-loader\index.js!C:\dev\ng2-tour-of-heroes\src\app\herosearch\herosearch.component.ts

Mention any other details that might be useful.

error: TypeError: WEBPACK_IMPORTED_MODULE_2_rxjs_observable.Observable.of is not a function at SwitchMapSubscriber.project (http://localhost:4200/main.bundle.js:62575:81) at SwitchMapSubscriber._next (http://localhost:4200/main.bundle.js:68811:27) at SwitchMapSubscriber.Subscriber.next (http://localhost:4200/main.bundle.js:2754:18) at DistinctUntilChangedSubscriber._next (http://localhost:4200/main.bundle.js:68272:30) at DistinctUntilChangedSubscriber.Subscriber.next (http://localhost:4200/main.bundle.js:2754:18) at DebounceTimeSubscriber.debouncedNext (http://localhost:4200/main.bundle.js:68035:30) at AsyncAction.dispatchNext (http://localhost:4200/main.bundle.js:68051:16) at AsyncAction._execute (http://localhost:4200/main.bundle.js:69030:18) at AsyncAction.execute (http://localhost:4200/main.bundle.js:69005:26) at AsyncScheduler.flush (http://localhost:4200/main.bundle.js:69103:32)


Thanks! We'll be in touch soon.

NilsHolger avatar Dec 10 '16 08:12 NilsHolger

This is actually a super useful warning! Different OS's have different rules for resolving file paths, and while some are case-insensitive, others are not.

So currently you seem to be importing in some files as rxjs\observable, but in others as rxjs\Observable (notice upper case O). The real importing is the rxjs\Observable one, so you should change your imports to that to avoid file system shenanigans.

filipesilva avatar Dec 12 '16 14:12 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.