Webpack: ChunkRenderError: No template for dependency: TemplateArgumentDependency

I'm attempting to update my Phenomic install to webpack 2 beta 13 (I've heard people suggest the beta is pretty stable now).

I get the follow error when trying to build version using the DedupePlugin, but it seems to work if I remove it. The error is:

phenomic:builder ChunkRenderError: No template for dependency: TemplateArgumentDependency at Compilation.createChunkAssets

Phenomic includes webpack itself and sets up part of the config. You can run a build using Phenomic and it will also take custom webpack settings from your own generate project. A default project is created for you to modify when you initialise Phenomic.

I've tried changing the version numbers to "webpack": "2.1.0-beta.13", under Phenomic's peer and normal dependencies and rebuilding with it npm linked. I also made a few of the changes needed for updating webpack 1 to version 2.

I've also deleted node_modules in both Phenomic and my project directories, which did not seem to help (and took a long time ;).

I've browsed through this thread which was webpack 1 related and there is some suggestion of dependencies causing multiple copies of webpack. Any ideas are appreciated.

Update: I made my webpack 2 changes in Phenomic and setup the default project. It seems to build (with some CSS issues), so the problem seems related to the more complex project I am using Phenomic with. Maybe another dependency is bringing in another copy of webpack.

Upvotes: 0

Views: 2581

Answers (1)

It seems this is npm link related as I installed installed Phenomic from my file system and the issue disappears.

I also noticed there was a global copy of Phenomic, which is also possibly related to npm link.

Another tip I found was npm ls is useful finding what dependencies are in use. You can pipe the output to a file if you want to read it in an editor.

Upvotes: 4

Related Questions