I am getting below Webpack error on a particular machine. on the other machine I am not getting any error & build is sucessful. on both machine we are using Webpack 2.2.1 version.
Error :
Set is not defined
at Compiler.<anonymous> (/home/../meCommerce-fed/fed-mecommerce/node_modules/copy-webpack-plugin/dist/index.js:83:33)
at Compiler.next (/home/../meCommerce-fed/fed-mecommerce/node_modules/webpack/node_modules/tapable/lib/Tapable.js:69:14)
at /home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/index.js:189:9
at PassThroughHandlerContext.finallyHandler (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/finally.js:56:23)
at PassThroughHandlerContext.tryCatcher (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/async.js:143:10)
at Async.drainQueues (/home/../meCommerce-fed/fed-mecommerce/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/async.js:17:14)
at process._tickCallback (node.js:415:13)
It's saying Set is not defined on copy-webpack-plugin which is little strange.
Webpack Config:
Note: This is not the entire config file.
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var CopyWebpackPlugin = require('copy-webpack-plugin');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var ProvidePlugin = require('webpack/lib/ProvidePlugin');
module.exports = {
debug: true,
entry: {
vendor_angular: ["angular","angular-ui-router","angular-sanitize"],
bundle: ['./src/app.js'],
},
// entry: ['babel-polyfill', './src/app.js'],
output: {
path: path.join(__dirname, 'public'),
filename: '[name].js'
},
devServer: {
// This is required for webpack-dev-server. The path should
// be an absolute path to your build destination.
outputPath: path.join(__dirname, 'public')
},
plugins: [
new CopyWebpackPlugin([
{ from: 'src/**/*.js', to: __dirname + '/public' },
{ from: 'src/**/*.png', to: __dirname + '/public' },
{ from: 'src/**/*.svg', to: __dirname + '/public' },
{ from: 'src/**/*.json', to: __dirname + '/public' },
{ from: 'src/**/*.jpg', to: __dirname + '/public' },
{ from: 'src/**/*.mp4', to: __dirname + '/public' },
{ from: 'src/**/*.gif', to: __dirname + '/public' },
{ from: 'src/**/*.wav', to: __dirname + '/public' }
]),
new CleanWebpackPlugin(['public'], {
root: path.resolve(__dirname),
verbose: true,
dry: true
}),
],
module: {
},
devtool: 'source-map'
};
Has anyone encountered similar error. How should I track down what is causing the build to fail.