# You forgot add min-css-extract-plugin

**URL:** <https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031>\
**Category:** Ionic Vue\
**Created:** [June 8, 2022, 6:02pm UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031 "2022-06-08T18:02:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bataino](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@Bataino](https://forum.ionicframework.com/u/Bataino)\
**Post date:** [June 8, 2022, 6:02pm UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/1 "2022-06-08T18:02:49Z")

</div>

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](https://github.com/webpack-contrib/mini-css-extract-plugin#getting-started)

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**

---

<div class="post-metadata">

**Author:** ![Hills90210](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Hills90210](https://forum.ionicframework.com/u/Hills90210)\
**Post date:** [June 8, 2022, 6:39pm UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/2 "2022-06-08T18:39:13Z")

</div>

> **[How do I ask a good question? - Help Center](https://stackoverflow.com/help/how-to-ask)**
>
> Stack Overflow | The World’s Largest Online Community for Developers

---

<div class="post-metadata">

**Author:** ![husudosu](https://avatars.discourse-cdn.com/v4/letter/h/cc9497/32.png) [@husudosu](https://forum.ionicframework.com/u/husudosu)\
**Post date:** [July 9, 2022, 1:12pm UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/3 "2022-07-09T13:12:48Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Bataino](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@Bataino](https://forum.ionicframework.com/u/Bataino)\
**Post date:** [July 11, 2022, 6:48am UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/4 "2022-07-11T06:48:12Z")

</div>

Yeah,  
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.

---

<div class="post-metadata">

**Author:** ![robomano-glitch](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@robomano-glitch](https://forum.ionicframework.com/u/robomano-glitch)\
**Post date:** [August 11, 2022, 12:27pm UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/5 "2022-08-11T12:27:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Bataino](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@Bataino](https://forum.ionicframework.com/u/Bataino)\
**Post date:** [August 12, 2022, 10:24am UTC](https://forum.ionicframework.com/t/you-forgot-add-min-css-extract-plugin/224031/6 "2022-08-12T10:24:28Z")

</div>

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