Reputation: 152
I'm getting this error when I run the script npm run watch
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js
i 「webpack」: Watching enabled \ Building Modules (16%)C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Chunk.js:824 throw new Error( ^
Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead at Chunk.get (C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Chunk.js:824:9) at C:\xampp\htdocs\VidhiStage\node_modules\laravel-mix\node_modules\extract-text-webpack-plugin\dist\index.js:176:48 at Array.forEach () at C:\xampp\htdocs\VidhiStage\node_modules\laravel-mix\node_modules\extract-text-webpack-plugin\dist\index.js:171:18 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\xampp\htdocs\VidhiStage\node_modules\tapable\lib\HookCodeFactory.js:24:12), :12:1) at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\xampp\htdocs\VidhiStage\node_modules\tapable\lib\Hook.js:35:21) at Compilation.seal (C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Compilation.js:1203:27) at hooks.make.callAsync.err (C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Compiler.js:547:17) at _err0 (eval at create (C:\xampp\htdocs\VidhiStage\node_modules\tapable\lib\HookCodeFactory.js:24:12), :11:1) at _addModuleChain (C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Compilation.js:1054:12) at processModuleDependencies.err (C:\xampp\htdocs\VidhiStage\node_modules\webpack\lib\Compilation.js:980:9) at process._tickCallback (internal/process/next_tick.js:172:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] watch:
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] watch script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\BIKI MALLIK\AppData\Roaming\npm-cache_logs\2018-08-02T08_45_14_967Z-debug.log
Following is the Webpack.config.js
:
const webpack = require('webpack');
module.exports = {
watch : true,
context: __dirname,
entry: {
main : "./Components/Admin/Admin.js",
},
output: {
path: __dirname+'/public/js/build',
filename : "Admin.js",
chunkFilename: 'chunk/[name].[chunkhash].js',
publicPath:'./js/build/'
},
resolve: {
alias: {
vue: 'vue/dist/vue.js',
lolly : 'quill/dist/quill.min.js'
}
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
},
{
test: /\.styl$/,
loader: 'css-loader!stylus-loader?paths=node_modules/bootstrap-stylus/stylus/',
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
]
}
Upvotes: 4
Views: 5862
Reputation: 8192
You could also upgrade the plugin:
npm install extract-text-webpack-plugin@next --save-dev
Upvotes: 0
Reputation: 1
npm uninstall mini-css-extract-plugin , and use webpack 3.1.2 , this should done the job and install webpack-cli :)
Upvotes: 0
Reputation: 1311
Your webpack version might be higher than 4.0.0. The plugin extract-text-webpack-plugin is not modified to be compatible with webpack > 4.0.0. So in the meantime use the version Webpack 4.
npm install --save-dev [email protected]
Upvotes: 2