Template cannot be applied as TemplateArgument: HarmonyImportDependency
See original GitHub issueI can’t understand what it means. It’s a bug? Maybe, I doing something wrong?
error stack:
vendor.js
Template cannot be applied as TemplateArgument: HarmonyImportDependency
Error: Template cannot be applied as TemplateArgument: HarmonyImportDependency
at TemplateArgumentDependencyTemplate.TemplateArgumentDependency.Template.apply (/home/mixtape/web/repo/gmail/node_modules/webpack/
lib/dependencies/TemplateArgumentDependency.js:24:46)
at doDep (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/NormalModule.js:227:12)
at Array.forEach (native)
at doBlock (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/NormalModule.js:243:22)
at NormalModule.source (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/NormalModule.js:278:2)
at ModuleTemplate.render (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/ModuleTemplate.js:15:28)
at ChunkTemplate.Template.renderChunkModules (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/Template.js:115:31)
at ChunkTemplate.render (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/ChunkTemplate.js:18:21)
at Compilation.createChunkAssets (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/Compilation.js:847:34)
at Compilation.<anonymous> (/home/mixtape/web/repo/gmail/node_modules/webpack/lib/Compilation.js:556:9)
my env: linux debian nodejs 5.11.0 webpack 2.1.0-beta.8
my webpack config:
"use strict";
const path = require("path");
const webpack = require("webpack");
const aprefix = require("autoprefixer");
const annotate = require("ng-annotate-webpack-plugin");
const isDev = require("./environments").isDev;
const isWatch = require("./environments").isWatch;
module.exports = function(root) {
let options = {
watch: isWatch,
context: root,
entry: {
app: ["./client/js/index.js"],
vendor: ["angular"]
},
output: {
path: path.join(root, "./server/public/assets/js/"),
filename: "[name].js",
chunkFilename: "[id].js",
publicPath: "",
pathinfo: isDev
},
debug: isWatch,
devtool: isWatch ? "#inline-source-map" : null,
resolve: {
modules: [root, "node_modules"],
extensions: [".js"],
enforceModuleExtension: false,
enforceExtension: false,
mainFields: ["main"],
descriptionFiles: ["package.json"]
},
resolveLoader: {
modulesDirectories: ["node_modules"],
extensions: ["", ".loader.js", ".js"],
moduleTemplates: ["*-loader", "*"]
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
minChunks: Infinity
})
],
module: {
loaders: [{
test: /\.js$/,
loader: "babel-loader",
include: [
path.join(root, "./client")
],
query: {
presets: ["es2015-webpack"]
}
}, {
test: /\.html$/,
loader: "html-loader",
include: [
path.join(root, "./client")
],
query: {
attrs: false
}
}, {
test: /\.styl$/,
loader: isDev ? "style-loader!css-loader!postcss-loader!stylus-loader?resolve url"
: "style-loader!css-loader?minimize!postcss-loader!stylus-loader?resolve url"
}, {
test: /\.svg$/,
loader: "svg-url-loader!svgo-loader"
}],
noParse: [
/angular\/angular.js/
]
},
postcss: function () {
return [aprefix({
browsers: ["last 2 versions", "Firefox ESR", "ie >= 9"]
})];
}
};
if (!isDev) {
options.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
"warnings": false,
"drop_debugger": true,
"drop_console" : true,
"unsafe": true
}
}),
new annotate()
);
}
if (!isWatch) {
options.plugins.push(
new webpack.optimize.DedupePlugin()
);
}
return options;
};
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
rangle/rangle-starter - Gitter
[chunkhash].js Template cannot be applied as TemplateArgument: HarmonyImportDependency Child html-webpack-plugin for "index.html": + 1 hidden modules.
Read more >What does "unspecialized class template can't be used as a ...
AbstractRManagers names a template, which isn't a type -- it has to have a template parameter give to become a type.
Read more >Partial template specialization - cppreference.com
The following restrictions apply to the argument-list of a partial template specialization: 1) The argument list cannot be identical to the non-specialized ...
Read more >Deducing non-type template arguments - IBM
The compiler cannot deduce the value of a non-type template argument used in an expression in the template function's parameter list.
Read more >7 Features of C++17 that will simplify your code - CodinGame
Template argument deduction for class templates ... is a template class, and template classes could not apply type deduction in their initialization.
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
The template for the DedupePlugin is missing for harmony imports. As workaround disable the DedupePlugin.
You can’t use the DedupePlugin with wbepack2 and Angular 2 until https://github.com/webpack/webpack/issues/2644 is solved.