nuxt npm run build 打包报错

nuxt npm run build 打包报错

  • 报错信息如下

nuxt npm run build 打包报错_第1张图片

  • 然后在报错信息上面去寻找报错源
ERROR in ./node_modules/bootstrap-vue/dist/bootstrap-vue.css
Module build failed (from ./node_modules/extract-css-chunks-webpack-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: postcss-svgo: TypeError: Cannot set property 'multipassCount' of undefined
    at D:\Web\ddbao\node_modules\postcss-svgo\dist\index.js:95:19
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at D:\Web\ddbao\node_modules\webpack\lib\NormalModule.js:316:20
    at D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at D:\Web\ddbao\node_modules\postcss-loader\src\index.js:208:9
 @ ./.nuxt/App.js 12:0-66
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./.nuxt/client.js

ERROR in ./node_modules/bootstrap/dist/css/bootstrap.css
Module build failed (from ./node_modules/extract-css-chunks-webpack-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: postcss-svgo: TypeError: Cannot set property 'multipassCount' of undefined
    at D:\Web\ddbao\node_modules\postcss-svgo\dist\index.js:95:19
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at D:\Web\ddbao\node_modules\webpack\lib\NormalModule.js:316:20
    at D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (D:\Web\ddbao\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at D:\Web\ddbao\node_modules\postcss-loader\src\index.js:208:9
 @ ./.nuxt/App.js 11:0-63
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./.nuxt/client.js

 FATAL  Nuxt build error                                                     10:05:31
  • bootstrap.css 这里出错了,然后一顿百度查,没找到,然后再去其他报错信息查
Error: postcss-svgo: TypeError: Cannot set property 'multipassCount' of undefined
    at D:\Web\ddbao\node_modules\postcss-svgo\dist\index.js:95:19

最后在 GitHub 上面找到了
nuxt npm run build 打包报错_第2张图片
bootstrap-vue

nuxt npm run build 打包报错_第3张图片
css svgo

https://github.com/svg/svgo/issues/1174 最终在这里找了

你可能感兴趣的:(Nuxt)