-
Notifications
You must be signed in to change notification settings - Fork 78
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
Running into error: No template for dependency: ConstDependency #27
Comments
Ok, it looks like this problem came from using the wrong webpack. My main project actually relied on another dev dependency to run webpack. When, I use the locally installed version of webpack, this issue went away. |
I met the same problem, I used webpack installed in project. Could you please tell me more details about how to solve this problem? |
My setup is a little more complicated than most. Before this issue I had a main project that had a dev dependency on another project which in turn depended on webpack. I actually run webpack via gulp through the node API. So, before this, I was running a version of webpack that was not a direct dependency of the main project (and possibly a different version). My solution was to require the locally installed webpack and pass it to my dev dependency to use to run the build. I assumed that the problem stemmed from using the dev dependency's version of webpack. But, if you are seeing this as well, maybe there's something else going on? |
I had the same error when building Angular 9 app. It seems that this error is caused by local install of package webpack under @angular-devkit when there is also an independent install under host package. I would guess that the code somehow uses files from node_modules@angular-devkit\build-angular\node_modules\webpack and node_modules\webpack somewhat haphazardly which leads to this error. Namely the constructor object in the dependencyTemplates-map is generated form one and the dependency.constructor for the other. Thus they are not the same object and subsequently the constructor is not found from map leading to all kinds of fun and games... It seems that ensuring identical versions of webpack in both locations and then running npm dedupe ensures that there is only one install of webpack and thus prevents this error. I would recommend that you check if you have several webpack install in your node_modules and dedupe them as possible. |
I'm not 100% sure what's causing this, but I have a project with a dependency and that dependency loads a Worker. When I try to run webpack I get:
Maybe it has to do with the combination of babel and loading the Worker from a dependency of the main project. Any ideas?
The text was updated successfully, but these errors were encountered: