-
Notifications
You must be signed in to change notification settings - Fork 12k
build aot: Error: No module factory available for dependency type: ContextElementDependency #4246
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
Comments
I cleared node_modules, rebuilt project and some clean ups and now gone, so closing, |
I'm getting the same error from our codeship build. My local build is fine but it's throwing the same thing exactly. @born2net can you reopen this? |
yes I can, if need to re-close let me know, |
I got this same error when I used |
I'll need a simple repro to investigate this if someone has it. |
I had the issue because i manually installed webpack so i had webpack2.3.1 for a different process in the project and was able to fix it by using webpack~2.2.0. |
@LasTanzen Thanks for the great tip! I just removed webpack from the DevDependencies and it works |
Same as @LasTanzen. Received this error today after upgrading to CLI 1.0.0 (and Angular 4.0.0). Putting Webpack at |
@filipesilva I'm having the problem in this one I tried changing to Webpack ~2.2.0 but that didn't do anything. I also tried removing Webpack from DevDependencies and got It happens with
|
@filipesilva Sorry I hadn't seen your solution from the other issue. Changing
to
eliminated that error. I have other problems with routing so I can't say for sure whether this has any bad consequences. I had been getting this error:
After making the above change, I am getting this one instead:
|
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version. If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. |
"dependencies": { ]; |
I am running into this issue when trying to upgrade my angular project to universal using Everton Roberto Auler's angular-cli-demo. @angular/cli: 1.1.3 I am using webpack ~2.2.0 as you can see here and I have read above this problem was supposed to be obsolete due to recent changes in cli. But when running "ng build && ngc && webpack" I get this error message: Thanks. Edit: after digging more into the issue, it seems the template compiler don't create ngfactory.ts files for some of my components. Can't figure out why. It happens since webpack was installed. |
I am having the same issue. but not on my travis build. when i use ng build for travis , it throws the following error
node: 6.10.0 |
Try reinstalling webpack. It worked for me. It seems it has some issues building factories for new components sometimes and needs to be reinstalled.
Hope it helps. |
Everything is working fine on my local machine. The problem occurs when i try to build it on travis. |
Is it possible to reopen this issue. |
This issue should definitely remain open. I persistently get this error, with or without AOT compilation, following recent upgrades to Angular CLI and Webpack. Still sticking to Angular 2.4.6 prior to update to 4.0.0. Error: No module factory available for dependency type: ContextElementDependency @angular/cli: 1.2.0 Webpack: 3.0.0 |
I forgot to mention that I have repeatedly cleaned and reinstalled node modules, tried global versus local installs of CLI and Webpack etc... npm cache clean --force My package.json was originally that provided by Angular Class with subsequent upgrades and additions. David @ Exertive |
I downgraded my local and global @angular/cli to 1.0.4, Hope that helps. |
I have similar problem Angular - 4.2.5
|
same issue here
package.json:
ng serve
source repository: https://github.com/rudzikdawid/material2-start |
We have the samme issue We are runnning: Node 8.1.4 When I do a --- @angular/[email protected] My package.json looks like this:
We have tried uninstalling webpack, but then we get another error (cant find webpack issue). Has anyone any ideas how to fix this? |
Heya, see #6417 for information about what causes this problem and how to fix it. |
I had a problem when the @angular/cli module version I had was 1.3.0. |
i had to set a version for webpack #9794 (comment) |
|
your solution is not work for me :( 1- Update Angular cli but same error : Runtime compiler is not loaded |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Repro steps.
Repo: https://github.com/born2net/studioweb
The log given by the failure.
dump:
seems the entire stack is from Webpack and no ref to any part of my code
Regards,
Sean
The text was updated successfully, but these errors were encountered: