syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

Browser & terminal errors: Critical dependency: the request of a dependency is an expression #28

Closed kahboom closed 8 years ago

kahboom commented 8 years ago

Overview

These started after updating Webpack, which required that we adjust our configuration settings. They are appearing both in the browser console and the terminal. They seem to be related to the same ngModule factory loader library.

Terminal Warnings

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
screenshot 2016-09-22 19 18 25

Browser Console Errors

[WDS] Warnings while compiling.
webpack-dev-server.js:3 ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
45:15 Critical dependency: the request of a dependency is an expression
CriticalDependencyWarning: Critical dependency: the request of a dependency is an expression
    at SystemImportContextDependency.getWarnings (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/dependencies/SystemImportContextDependency.js:23:4)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:640:21
    at Array.forEach (native)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:639:22
    at Array.forEach (native)
    at Compilation.reportDependencyWarnings (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:638:9)
    at Compilation.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:497:8)
    at Array.forEach (native)
    at Compilation.finish (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:496:15)
    at Compiler.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compiler.js:434:15)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/tapable/lib/Tapable.js:152:11
    at Compilation.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:444:10)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:420:12
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10
screenshot 2016-09-23 14 05 01 screenshot 2016-09-23 14 05 23
kahboom commented 8 years ago

Resolved by adding ContextReplacementPlugin entry that updates loading of Angular core: https://github.com/hawtio/hawtio-ipaas/commit/179247ec4778a41fcc3c9e45167712e6b75f066a