# Remove Storybook from Next.js & Slice Machine

**URL:** <https://community.prismic.io/t/remove-storybook-from-next-js-slice-machine/9266>\
**Category:** FAQs\
**Created:** [March 4, 2022, 4:32pm UTC](https://community.prismic.io/t/remove-storybook-from-next-js-slice-machine/9266 "2022-03-04T16:32:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)\
**Post date:** [March 4, 2022, 4:32pm UTC](https://community.prismic.io/t/remove-storybook-from-next-js-slice-machine/9266/1 "2022-03-04T16:32:53Z")

</div>

Learn how to remove Storybook and prepare your app for Slice Simulations.

* * *

## 1. Delete the `.storybook` file

```auto
 .slicemachine
-.storybook
 components
 customtypes

```

## 2. Uninstall the dependencies

Use either the npm or yarn commands below:

npm

```auto
npm uninstall @storybook/react

```

yarn

```auto
yarn remove @storybook/react

```

> **Other dependencies**
> 
> You can also remove any other Storybook-related dependencies such as `babel-loader`, `babel-plugin-react-require`, and any others you are using.

## 3. Remove the Storybook scripts from your package.json

Remove the `storybook` and `build-storybook` scripts:

```auto
"scripts": {
  "dev": "next dev",
  "build": "next build",
  "start": "next start",
  "export": "next export",
  "slicemachine": "start-slicemachine --port 9999",
- "storybook": "start-storybook -p 8888",
- "build-storybook": "build-storybook"
},

```

## 4. Update the sm.json

Remove the "storybook" configuration.

```auto
{
  "apiEndpoint": "https://your-repo-name.cdn.prismic.io/api/v2",
  "libraries": [
    "@/slices"
  ],
  "_latest": "0.2.0",
- "storybook": "http://localhost:8888"
}

```

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [December 21, 2023, 5:27pm UTC](https://community.prismic.io/t/remove-storybook-from-next-js-slice-machine/9266/2 "2023-12-21T17:27:42Z")

</div>


