You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.0
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
Since i ve upgraded to ionic 3, i get this error in my webpack build:
WARNING in /xxx/app/~/ionic-angular/util/ng-module-loader.js
54:11-36 Critical dependency: the request of a dependency is an expression
at ImportContextDependency.getWarnings (/xxx/app/node_modules/webpack/lib/dependencies/ImportContextDependency.js:28:4)
at Compilation.reportDependencyErrorsAndWarnings (/xxx/app/node_modules/webpack/lib/Compilation.js:668:24)
at Compilation.finish (/xxx/app/node_modules/webpack/lib/Compilation.js:531:9)
at /xxx/app/node_modules/webpack/lib/Compiler.js:486:16
at /xxx/app/node_modules/tapable/lib/Tapable.js:225:11
at _addModuleChain (/xxx/app/node_modules/webpack/lib/Compilation.js:477:11)
at processModuleDependencies.err (/xxx/app/node_modules/webpack/lib/Compilation.js:448:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!
Reacted by J.D Nicholls, Marco Turi, btpka3, Mimi Flynn, Keith D. Moore, Tim Prüssing, Richard Leo, Chris Heney and Loïs Tonnet
WARNING in ./~/ionic-angular/util/ng-module-loader.js
54:11-36 Critical dependency: the request of a dependency is an expression
WARNING in ./~/ionic-angular/util/ng-module-loader.js
69:11-36 Critical dependency: the request of a dependency is an expression
@ghaiat Did you managed to resolve this issue ? Also could you provide a little more context about it?
And together with angular 4 warnings it becomes new ContextReplacementPlugin( /(ionic-angular)|(angular(\\|\/)core(\\|\/)@angular)/, path.resolve('./src') , {} )
Reacted by Marco Turi, Mikhail Nasyrov, Ryan Vandenberg, Sebastián Ferreras, zaq5278, Blake Johnston and Henry Miskin
Reacted by Sebastián Ferreras, Carlos Molina A and Henry Miskin
Why is this issue closed? Since version 3 i also get these warnings
WARNING in ./~/ionic-angular/util/ng-module-loader.js
54:11-36 Critical dependency: the request of a dependency is an expression
WARNING in ./~/ionic-angular/util/ng-module-loader.js
69:11-36 Critical dependency: the request of a dependency is an expression
which basically says there is a dynamic import and dynamic imports should not be used.
Since im using angular/cli and not ionic/cli (i only like the framework for build i simply use cordova and angular cli running ng build --prod --base-href ./ --output-path www --output-hashing=none) . Can this issue be fixed on library side?
Reacted by Richard Stiller, Ganesha, Wagner Maestrelli, Shane Hughes, Ka Mok, Emil Johansson, Ignat S., btpka3, J.D Nicholls, Ivar Kallejarv and 1 more
I'm getting this error when running karma/jasmine tests, and I don't have a webpack conf where I can add the aforementioned fix. The folks over at webpack seem to imply that this is an issue that shouldn't be suppressed, so shouldn't we be talking about a library fix?
@jgw96 Can you please reopen? I'm getting the same issue as @shanehughes3. I also don't have a webpack config and I have the problem when running karma/jasmine tests. This surfaced after upgrading to ionic 3.1.1
I know this is not a final fix but both of you guys could have a different webpack config for your tests and implement the fix above(just so you can get rid of the warnings until ionic fixes it)' One issue is related to angular 4 the other one is from ionic native
@kamok if you are using karma/webpack to run your unit tests you should have created a webpack config.
in your karma.conf file you should have a webpack property that points to your custom webpack test file
@kamok , that's because you are using angular cli together with karma. Angular cli uses webpack in the background but I'm not sure to what extent you can customize their Webpack config.
Rather use your own webpack config for unit tests and pass it to your karma.conf (you will need to install karma-webpack plugin though)
then in your karma.conf file replace angularCli: { environment: 'dev' },
with webpack: path/to/TestWebpackConfig,
@jgw96 Any news guys? thanks in advance, it's really neccesary without eject the webpack configuration of angular to fix the issue! 👍
WARNING in ./~/ionic-angular/util/ng-module-loader.js
54:11-36 Critical dependency: the request of a dependency is an expression
WARNING in ./~/ionic-angular/util/ng-module-loader.js
69:11-36 Critical dependency: the request of a dependency is an expression
@jgw96 Justin, please reopen this issue. it's generated from the library because this is an incompatibility with the "ng serve" of the angular-cli.
Thanks guys in advance! ✌️
Reacted by Shane Hughes, sebastianhaas, Marco Turi, Marco Molinari and Tim Prüssing
@jgw96@mlynch Any news about this item? it's very complicated? Any response from the Ionic team is really appreciated 🙏 (this would be like a Christmas gift)
WARNING in ./node_modules/ionic-angular/es2015/util/ng-module-loader.js
25:11-36 Critical dependency: the request of a dependency is an expression
@ ./node_modules/ionic-angular/es2015/util/ng-module-loader.js
@ ./node_modules/ionic-angular/es2015/util/module-loader.js
@ ./node_modules/ionic-angular/es2015/components/modal/modal-component.js
@ ./node_modules/ionic-angular/es2015/index.js
@ ./src/test.ts
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
jgw96 commentedon Apr 5, 2017
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!
marcoturi commentedon Apr 11, 2017
I run to the same issue updating ionic2-boilerplate to ionic 3 during unit testing command. It looks similar to those issues
angular/angular#11580
webpack/webpack#196
I got:
@ghaiat Did you managed to resolve this issue ? Also could you provide a little more context about it?
marcoturi commentedon Apr 11, 2017
For anyone having this issue, the fix is to add in you webpack configuration:
cryo243 commentedon Apr 12, 2017
And together with angular 4 warnings it becomes
new ContextReplacementPlugin( /(ionic-angular)|(angular(\\|\/)core(\\|\/)@angular)/, path.resolve('./src') , {} )maapteh commentedon Apr 15, 2017
Why is this issue closed? Since version 3 i also get these warnings
which basically says there is a dynamic import and dynamic imports should not be used.
Since im using angular/cli and not ionic/cli (i only like the framework for build i simply use cordova and angular cli running
ng build --prod --base-href ./ --output-path www --output-hashing=none) . Can this issue be fixed on library side?schacki commentedon May 3, 2017
@maapteh : angular/angular.io#3514
shanehughes3 commentedon May 8, 2017
I'm getting this error when running karma/jasmine tests, and I don't have a webpack conf where I can add the aforementioned fix. The folks over at webpack seem to imply that this is an issue that shouldn't be suppressed, so shouldn't we be talking about a library fix?
kamok commentedon May 18, 2017
@jgw96 Can you please reopen? I'm getting the same issue as @shanehughes3. I also don't have a webpack config and I have the problem when running karma/jasmine tests. This surfaced after upgrading to ionic
3.1.1cryo243 commentedon May 18, 2017
I know this is not a final fix but both of you guys could have a different webpack config for your tests and implement the fix above(just so you can get rid of the warnings until ionic fixes it)' One issue is related to angular 4 the other one is from ionic native
kamok commentedon May 18, 2017
@cryo243 I can't find a webpack config in my app. I don't know where it is. Is it in the node_modules/angular folder?
cryo243 commentedon May 18, 2017
@kamok if you are using karma/webpack to run your unit tests you should have created a webpack config.
in your karma.conf file you should have a webpack property that points to your custom webpack test file
kamok commentedon May 18, 2017
@cryo243 I use angular/cli. Same set up as this seeder project: https://github.com/lathonez/clicker
cryo243 commentedon May 19, 2017
@kamok , that's because you are using angular cli together with karma. Angular cli uses webpack in the background but I'm not sure to what extent you can customize their Webpack config.
Rather use your own webpack config for unit tests and pass it to your karma.conf (you will need to install karma-webpack plugin though)
then in your karma.conf file replace
angularCli: { environment: 'dev' },with
webpack: path/to/TestWebpackConfig,russcarver commentedon Jun 29, 2017
Can someone post the contents of just what such a "test" webpack config should look like?
tinomen commentedon Sep 28, 2017
I get this warning twice. Is the current solution still to suppress them?
jdnichollsc commentedon Nov 3, 2017
@jgw96 Any news guys? thanks in advance, it's really neccesary without eject the webpack configuration of angular to fix the issue! 👍
cryo243 commentedon Nov 3, 2017
Hi guys,
I thought I would create very basic example feel free to check https://github.com/cryo243/ionic-unit-tests
jdnichollsc commentedon Nov 5, 2017
@jgw96 Justin, please reopen this issue. it's generated from the library because this is an incompatibility with the "ng serve" of the angular-cli.
Thanks guys in advance! ✌️
jdnichollsc commentedon Nov 23, 2017
@jgw96 @mlynch Any news about this item? it's very complicated? Any response from the Ionic team is really appreciated 🙏 (this would be like a Christmas gift)
jdnichollsc commentedon Jan 4, 2018
Hi @danbucholtz, Is possible to create a new release of Ionic with the fix of the default webpack configuration with the following fix? https://github.com/ionic-team/ionic-unit-testing-example/pull/34/files
Thanks in advance guys!
jdnichollsc commentedon Jan 4, 2018
Guys, what do you think about the following PR? ionic-team/ionic-app-scripts#1360
damsorian commentedon May 23, 2018
this issue is not resolved ...
jdnichollsc commentedon May 24, 2018
@damsorian I'm waiting for Ionic 4 due to this issue...
edwinm commentedon Jul 2, 2018
July 2nd 2018 and still not resolved...
ionitron-bot commentedon Sep 1, 2018
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.