1

我正在尝试在开发模式下运行 web 工具包,但mini-css-extract-plugin模块构建失败,每个 CSS 文件一次。让我发布其中的一些:

error  in ./node_modules/vue-multiselect/dist/vue-multiselect.min.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/vue-style-loader/index.js):
TypeError: Cannot read property 'target' of undefined
    at Object.module.exports.pitch (/var/www/VueFrontEnd/node_modules/vue-style-loader/index.js:15:31)
    at runLoaders (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:301:20)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:182:20
    at runSyncOrAsync (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:178:3
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:176:18
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
    at NormalModule.doBuild (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:280:3)
    at NormalModule.build (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:427:15)
    at Compilation.buildModule (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:635:10)
    at moduleFactory.create (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:1021:12)

 @ ./src/main.js 16:0-54
 @ multi ./build/dev-client ./src/main.js

 error  in ./node_modules/leaflet/dist/leaflet.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/vue-style-loader/index.js):
TypeError: Cannot read property 'target' of undefined
    at Object.module.exports.pitch (/var/www/VueFrontEnd/node_modules/vue-style-loader/index.js:15:31)
    at runLoaders (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:301:20)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:182:20
    at runSyncOrAsync (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:178:3
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:176:18
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
    at NormalModule.doBuild (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:280:3)
    at NormalModule.build (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:427:15)
    at Compilation.buildModule (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:635:10)
    at moduleFactory.create (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:1021:12)

 @ ./src/pages/Displays/NewDisplayWizard/Page3.vue?vue&type=script&lang=js& 95:0-35
 @ ./src/pages/Displays/NewDisplayWizard/Page3.vue
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./node_modules/leaflet-loading/src/Control.Loading.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/vue-style-loader/index.js):
TypeError: Cannot read property 'target' of undefined
    at Object.module.exports.pitch (/var/www/VueFrontEnd/node_modules/vue-style-loader/index.js:15:31)
    at runLoaders (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:301:20)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:182:20
    at runSyncOrAsync (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:178:3
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:176:18
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
    at NormalModule.doBuild (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:280:3)
    at NormalModule.build (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:427:15)
    at Compilation.buildModule (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:635:10)
    at moduleFactory.create (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:1021:12)

 @ ./src/pages/Scheduling/SchedulingMap.vue?vue&type=script&lang=js& 55:0-50
 @ ./src/pages/Scheduling/SchedulingMap.vue
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./node_modules/leaflet-sidebar/src/L.Control.Sidebar.css

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/vue-style-loader/index.js):
TypeError: Cannot read property 'target' of undefined
    at Object.module.exports.pitch (/var/www/VueFrontEnd/node_modules/vue-style-loader/index.js:15:31)
    at runLoaders (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:301:20)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:182:20
    at runSyncOrAsync (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:178:3
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:176:18
    at loadLoader (/var/www/VueFrontEnd/node_modules/loader-runner/lib/loadLoader.js:47:3)
    at iteratePitchingLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/var/www/VueFrontEnd/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
    at NormalModule.doBuild (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:280:3)
    at NormalModule.build (/var/www/VueFrontEnd/node_modules/webpack/lib/NormalModule.js:427:15)
    at Compilation.buildModule (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:635:10)
    at moduleFactory.create (/var/www/VueFrontEnd/node_modules/webpack/lib/Compilation.js:1021:12)

 @ ./src/pages/Scheduling/SchedulingMap.vue?vue&type=script&lang=js& 52:0-52
 @ ./src/pages/Scheduling/SchedulingMap.vue
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

这是我定义它的地方:

  {
    test: /\.css$/,
    use: [
      {
        loader: MiniCssExtractPlugin.loader,
      },
      "css-loader"
    ]
  },

接着:

new MiniCssExtractPlugin({
  filename: '[name]-bundle.css'
})

我将不胜感激。

4

0 回答 0