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

Spec files cannot find rxjs operator functions in 1.7.0-rc.0, but works in 1.6.1

Open abeymg opened this issue 8 years ago • 4 comments

Versions

Angular CLI: 1.7.0-rc.0
Node: 6.9.0
OS: darwin x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.2.0
@angular/cli: 1.7.0-rc.0
@angular/flex-layout: 2.0.0-beta.12
@angular/material: 5.2.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.10.0-rc.0
typescript: 2.5.3
webpack: 3.10.0

Repro steps

  • Step 1 Upgrade an angular project using cli version 1.6.1 to cli 1.7.0-rc.0
  • Step 2 Run unit tests

Observed behavior

Specs have trouble finding the rxjs operators and throw exceptions similar to:

TypeError: Observable_1.Observable.timer is not a function

Desired behavior

Expected this to work just like it did in 1.6.1.

Mention any other details that might be useful (optional)

The rxjs operators are all imported in app.module.ts e.g.

import 'rxjs/add/observable/timer';

abeymg avatar Feb 09 '18 02:02 abeymg

Researching this some more, I suspect this is due to the change in RxJs with lettable operators. What is unclear is why these errors are showing up by just updating cli alone to 1.7.0-rc.0. That is to say:

rxjs 5.5.5 + cli 1.6.1 => works rxjs 5.5.5 + cli 1.7.0-rc.0 => does not work

abeymg avatar Feb 09 '18 12:02 abeymg

@abeymg could you do npm ls rxjs and let us know the output?

hansl avatar Feb 13 '18 20:02 hansl

I just updated to cli 6.0.0-beta.3 and this is not an issue anymore.

abeymg avatar Feb 26 '18 22:02 abeymg

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.