Angular-cli: Critical dependency: the request of a dependency is an expression

Created on 26 Sep 2016  路  3Comments  路  Source: angular/angular-cli

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    macOS El Capitan
  2. 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.15
    node: 6.4.0
    os: darwin x64
    
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    ng new testapp
    cd testapp
    ng test
  4. The log given by the failure. Normally this include a stack trace and some
    more information.

    WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
    45:15 Critical dependency: the request of a dependency is an expression
    
    WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
    57:15 Critical dependency: the request of a dependency is an expression
    
  5. Mention any other details that might be useful.
    I believe this is the fix for it. https://github.com/angular/angular/issues/11580#issuecomment-246880731
    The warning only happens while running ng test but not when doing ng build or ng serve
easy (hours) help wanted 3 (nice to have)

Most helpful comment

Need to add ContextReplacementPlugin in test configs. A PR would be welcomed for this.

All 3 comments

Need to add ContextReplacementPlugin in test configs. A PR would be welcomed for this.

With #2362 closed, this can be closed as well, right?

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brtnshrdr picture brtnshrdr  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

purushottamjha picture purushottamjha  路  3Comments

hareeshav picture hareeshav  路  3Comments

sysmat picture sysmat  路  3Comments