New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgraded to RC7 getting warnings: Critical dependency: the request of a dependency is an expression #993
Comments
Same issue here...I upgraded webpack to beta.22 and latest versions of dev server and dev middleware too. |
I just get this: ( beta.21)
|
Adding
to webpack.common.js disables this check and warning message. Not sure what the proper fix is. EDIT:
Will open a PR for reference. |
Just FYI, for me the |
@Simon-Briggs Regarding the changes you suggest, could you clarify exactly where the files are that are supposed to be changed? |
@Mellbourn If you're using WebPack to do your builds it'll be in the webpack config file under a section called plugins. For this repo the config file is in config/webpack.common.js |
@Simon-Briggs I'm using Angular-CLI, so there is no config folder. |
@Melbourn. Angular CLI uses webpack but hides the config file from the user as its all preconfigured. If you update your version of angular CLI, it should just work. |
@Simon-Briggs Not sure what I'm doing wrong, but by adding your solution to my webpack.common.js, so I have:
I still get:
When running my tests... |
@georgeedwards |
Resolving: no longer relevant |
@d3viant0ne how is this no longer relevant? I'll be honest I'm not using angular2-webpack-starter but I am seeing this error and the plugin solution has worked well for me (though it seemed like a hack). Is this resolved in a better way now? I just pulled all the latest modules from npm. |
Using the ContextReplacementPlugin hack causes webpack to start watching the folder you pass to it for any changes. So if __dirname is your project root it will watch any file in your project for changes it seems. |
A version of this error will surface when upgrading to Angular 4.0.0-rc.1.
This change in webpack.common.js resolved the issue for me. Credit to Martin Wegner here https://github.com/angular/angular/issues/11580
|
@d3viant0ne This seems still relevant. I'm getting this now, and its over 6 months since reported. Are the dynamic |
@gregbown Thank you, your solution solved it for me. Currently on Angular 4.0.1. |
@gregbown could you please provide an example on how to populate the Let's say I have Thanks |
Upgraded to Angular 4 because everybody said it was easy and non breaking. This is my plugins section //Supposed fix //Origanal ---> new webpack.ContextReplacementPlugin(/@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for angular/angular#11580 new webpack.IgnorePlugin(/^vertx$/) // Workaround for stefanpenner/es6-promise#100 |
Can this be reopened? I'm having the same error with 4.4.3. |
This is still very relevant. I'am working with the latest version of angular and I have this all the time: WARNING in ./node_modules/@angular/core/@angular/core.es5.js If I use the contextreplacement hack the warning is gone - but watch and reload do not work properly anymore. It restarts all the time. |
@devspireRoland I had the same problem as you today after updating to Angular 5. I managed to fix it with this code: webpack.common.js
|
@clundberg1 I have the same issue just after upgrading to Angular 5. But I don't have a |
@ShinDarth I'm in the same boat using Angular-CLI, if you have a solution please let us know. Thanks |
I noticed that RC7 was released a couple of hours ago and I have upgraded to it. I now get two warnings in the console and typescript compiler.
Think once you update this project to RC7 you might get the same warnings? Any ideas how to fix this?
Edit: This is really sloppy, but to get rid of the warnings just comment out line 32 in node_modules/webpack/lib/dependencies/ContextDependencyHelpers.js until proper fix is available.
Edit2: See @Simon-Briggs answer for proper fix.
The text was updated successfully, but these errors were encountered: