DedupePlugin fails: No template for dependency: TemplateArgumentDependency
See original GitHub issueHi folks,
Great job with Webpack, this framework is really helping my project to succeed. I’m using version 1.8.11
through gulp-webpack
and after I’ve added react-intl
in my project this problem started to happen:
Error: No template for dependency: TemplateArgumentDependency
at doDep (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/NormalModule.js:116:23)
at Array.forEach (native)
at doBlock (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/NormalModule.js:125:22)
at DependenciesBlock.NormalModule.source (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/NormalModule.js:159:2)
at Tapable.ModuleTemplate.render (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/ModuleTemplate.js:14:28)
at Tapable.Template.renderChunkModules (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/Template.js:80:31)
at Tapable.<anonymous> (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/MainTemplate.js:28:22)
at Tapable.applyPlugins [as applyPluginsWaterfall] (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/node_modules/tapable/lib/Tapable.js:37:47)
at Tapable.MainTemplate.render (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/MainTemplate.js:111:20)
at Tapable.createChunkAssets (/Users/alansouza/project-workspace/project/node_modules/gulp-webpack/node_modules/webpack/lib/Compilation.js:784:32)
After some investigation and checking out some suggestions in the webpack Gitter chat, I decided to remove the Dedupe Plugin and then everything works again, but my bundle size has increased significantly.
Any ideas on how to make the DedupePlugin work again? If I get any pointers I could try to solve the issue myself. Any help here is much appreciated.
Alan
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Webpack: ChunkRenderError: No template for dependency
Update: I made my webpack 2 changes in Phenomic and setup the default project. It seems to build (with some CSS issues), so...
Read more >webpack/webpack - Gitter
Still stuck with the error - Error: No template for dependency: TemplateArgumentDependency . This happens when I include dedupe plugin.. Tobias Koppers.
Read more >Discussion of No template for dependency: "ConstDependency"
It seems that this error is caused by local install of package webpack under @angular-devkit when there is also an independent install under ......
Read more >To v5 from v4 - webpack
Upgrade webpack 4 and its plugins/loaders · Make sure your build has no errors or warnings · Make sure to use mode ·...
Read more >webpack @ 4.0.0-alpha.0 .. 4.0.0-alpha.1 - Package Diff
console.log("Invalid plugin arguments " + name + " (" + e + ")."); ... console.error("No configuration file found and no output filename configured...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks!
For anyone encountering this in the future, the comment referenced above says:
I was using a
serverless-webpack-plugin
which had it’s ownwebpack
dependency it was using to bundle files. However, I had manually installed andrequire
d webpack in my project’s webpack config as well (like you normally would with webpack). Consequently, when I removed my explicitly installed version of webpack withnpm rm --save-dev webpack
, the plugin was able torequire
it’s own scopedwebpack
dependency instead which worked.I’ll alert the
serverless-webpack-plugin
repo to this issue to figure out how to make it easier to use in the future.rm -rf node_modules && npm i
solved the issue. Please ignore my previous message.