错误:Chunk.entrypoints:使用Chunks.groupsIterable并按instanceof Entrypoint进行过滤

时间:2018-08-02 08:52:48

标签: javascript laravel-5 npm webpack

运行脚本npm run watch

时遇到此错误
  

跨环境NODE_ENV =开发node_modules / webpack / bin / webpack.js --watch --progress --config = node_modules / laravel-mix / setup / webpack.config.js

     

i「webpack」:已启用监视\构建模块   (16%)C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Chunk.js:824                   抛出新的错误(                   ^

     

错误:Chunk.entrypoints:使用Chunks.groupsIterable并按   代替EntryPoint的instanceof       在Chunk.get(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Chunk.js:824:9)       在C:\ xampp \ htdocs \ VidhiStage \ node_modules \ laravel-mix \ node_modules \ extract-text-webpack-plugin \ dist \ index.js:176:48       在Array.forEach()       在C:\ xampp \ htdocs \ VidhiStage \ node_modules \ laravel-mix \ node_modules \ extract-text-webpack-plugin \ dist \ index.js:171:18       在AsyncSeriesHook.eval [作为callAsync](在创建时(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ tapable \ lib \ HookCodeFactory.js:24:12)评估,   :12:1)       在AsyncSeriesHook.lazyCompileHook [作为_callAsync](C:\ xampp \ htdocs \ VidhiStage \ node_modules \ tapable \ lib \ Hook.js:35:21)       在Compilation.seal(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Compilation.js:1203:27)       在hooks.make.callAsync.err(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Compiler.js:547:17)       在_err0(在创建时为(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ tapable \ lib \ HookCodeFactory.js:24:12),   :11:1)       在_addModuleChain(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Compilation.js:1054:12)       在processModuleDependencies.err(C:\ xampp \ htdocs \ VidhiStage \ node_modules \ webpack \ lib \ Compilation.js:980:9)       在process._tickCallback(内部/进程/next_tick.js:172:11)npm错误!代码ELIFECYCLE npm ERR! errno 1 npm错误! VidhiStage@1.0.0   观看:cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js npm错误!退出状态1 npm ERR! npm ERR!在VidhiStage@1.0.0手表上失败   脚本。 npm ERR! npm可能不是问题。有   上面可能还有其他日志记录输出。

     

npm错误!有关此运行的完整日志,请参见:npm ERR!
  C:\ Users \ BIKI   MALLIK \ AppData \ Roaming \ npm-cache_logs \ 2018-08-02T08_45_14_967Z-debug.log

以下是Webpack.config.js

const webpack = require('webpack');
module.exports = {
  watch : true,
  context: __dirname,
  entry: {
    main : "./Vidhikarya/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: [
  ]
}

3 个答案:

答案 0 :(得分:2)

您的Webpack版本可能高于4.0.0。插件 extract-text-webpack-plugin 未修改为与Webpack> 4.0.0兼容。因此,与此同时,请使用Webpack 4版本。

npm install --save-dev webpack@4.0.0

答案 1 :(得分:0)

npm卸载mini-css-extract-plugin,并使用webpack 3.1.2,这应该可以完成工作并安装webpack-cli :)

答案 2 :(得分:0)

您还可以升级插件:

npm install extract-text-webpack-plugin@next --save-dev