# After running npm start it was deleting dist folder

**URL:** https://discourse.roots.io/t/after-running-npm-start-it-was-deleting-dist-folder/14297
**Category:** sage
**Created:** 2018-12-07T00:36:08Z
**Posts:** 10

## Post 1 by @Vidya_Dany — 2018-12-07T00:36:08Z

Hi  
I’m using wordpress sage theme. It is my first time working with sage theme. I setup my wp site in local in windows system. When i run npm start it is deleting my dist folder and show the errors as show n in the picture. Please help me I’m not understand where i’m doing wrong.

 ![npmstart](https://discourse.roots.io/uploads/default/original/2X/f/f55c7bd75057edd80215533696c88980afc36812.png)

---

## Post 2 by @alwaysblank — 2018-12-07T00:40:10Z

> [@Vidya_Dany](#):
>
> When i run npm start it is deleting my dist folder

This is the intended behavior. See the documentation:

[https://roots.io/sage/docs/theme-development-and-building/#asset-generation-with-yarn-build-vs-yarn-start](https://roots.io/sage/docs/theme-development-and-building/#asset-generation-with-yarn-build-vs-yarn-start)

Your problem with `$spacer` seems to be related to Bootstrap. Please have a look at some of the other posts in this forum that deal with this exact issue: [https://discourse.roots.io/search?q=undefined%20variable%20spacer](https://discourse.roots.io/search?q=undefined%20variable%20spacer)

---

## Post 3 by @Vidya_Dany — 2018-12-07T03:58:29Z

I installed bootstrap version 4 and imported it in dist/styles/main.css but still i getting same error when i run npm start

---

## Post 4 by @erit — 2018-12-07T15:49:18Z

Don’t edit files in the dist folder, those are generated every time you run `yarn build`.

Bootstrap 4 can be added for you if you install the theme via composer.  
`composer create-project roots/sage your-theme-name`

See the [github repo](https://github.com/roots/sage) and the [sage docs](https://roots.io/sage/docs/theme-installation/) for more instructions.

---

## Post 5 by @Vidya_Dany — 2018-12-08T03:16:07Z

I went through the document i import bootsrap file in resources/assets/styles/main.scss folder but still getting same problem " Undefined variable: “$spacer”"

---

## Post 6 by @MWDelaney — 2018-12-08T22:18:39Z

Which version of Sage are you using? Is it a recent version or an old one?

If it’s a recent one, Sage 9, then importing Bootstrap in `main.scss` is not the supported or example method of using Bootstrap with Sage. Check out [the default Sage configuration](https://github.com/roots/sage/blob/master/resources/assets/styles/main.scss) which uses Bootstrap. You’ll see that Bootstrap is included [in the autoload directory](https://github.com/roots/sage/tree/master/resources/assets/styles/).

Following this example does work and is the recommended practice for using Bootstrap with Sage 9.

---

## Post 7 by @Vidya_Dany — 2018-12-09T00:36:23Z

I’m using sage 9. I applied the changes but it did not work.

 ![spacer_undefined](https://discourse.roots.io/uploads/default/original/2X/7/779e652b1d3039878767df44e3c33cb19171948f.png)

---

## Post 8 by @MWDelaney — 2018-12-09T00:55:02Z

What changes did you apply, and how did you apply them? Can you detail the changes you made?

---

## Post 9 by @Vidya_Dany — 2018-12-10T03:32:02Z

thanks for the help , it is working now small issue with the file path during the import…, your reference was very helpful in identifying the cause.

---

## Post 10 by @system — 2019-01-18T00:36:11Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
