You forgot add min-css-extract-plugin

ERROR Failed to compile with 1 error 6:47:00 PM

error in ./src/components/ReviewStar.vue?vue&type=style&index=0&id=970ef5a4&scoped=true&lang=css

Syntax Error: Error: You forgot to add ‘mini-css-extract-plugin’ plugin (i.e. { plugins: [new MiniCssExtractPlugin()] }), please read GitHub - webpack-contrib/mini-css-extract-plugin: Lightweight CSS extraction plugin

ERROR Error: Build failed with errors.
Error: Build failed with errors.
at C:\Users\USER\Documents\Projects\voxforem\IosAppEdumium\node_modules@vue\cli-service\lib\commands\build\index.js:207:23
at C:\Users\USER\Documents\Projects\voxforem\IosAppEdumium\node_modules\webpack\lib\webpack.js:148:8
at C:\Users\USER\Documents\Projects\voxforem\IosAppEdumium\node_modules\webpack\lib\HookWebpackError.js:68:3
at Hook.eval [as callAsync] (eval at create (C:\Users\USER\Documents\Projects\voxforem\IosAppEdumium\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)

When I try to Build locally,I face this error but it builds on netlify successfully

So I had this error too with any Ionic created app.
How to reproduce:

  • Open powershell console
  • Create an Ionic app or clone existing app
  • Do the initial stuff like npm install on root directory
  • ionic cap sync

You don’t have install mini-css-extract-plugin! So the issue I had a running development server. I’ve closed the server and ionic cap sync and just worked after that!

It’s more like issue with the environment or terminal that’s running the script.

I was running it with Vs code’s Terminal when the error occurred. But when I run it with cmd and git doesn’t pull out the error.

But I don’t really understand why that was happening.

I went through the same and your solution of switching from VS code terminal to CMD worked, thanks a lot, why would this happen though?

I think probably the Vs terminal does not have the permissions to run the scripts the build process is trying to run.