Search code examples
reactjsuninstallationstorybook

How to remove storybook from the react project


How to uninstall storybook from the react project ? what is the command should I've to use to uninstall storybook?


Solution

  • They don't have a cli command to automate this. Follow the following steps to remove storybook from your project

    • delete your stories
    • delete the .storybook folder
    • delete the scripts added to package.json
    • delete all storybook related dependencies from package.json
    • run yarn or npm install to update the lockfile

    Storybook doesn't know where your stories are until runtime, so it's hard to know exactly what to delete. Also users sometimes have multiple storybooks in 1 repo, so overall it's rather complicated. Adding files is usually safer then removing... we might remove something that the user can't recover from.

    Here is a full discussion on github