npm uninstall --save -dev @kadira/storybook
leaves a bunch of extra files. Here's the error message, and thanks in advance:
`npm WARN gentlyRm not removing /Users/davidrhodes/Desktop/biblio/node_modules/@kadira/storybook/node_modules/.bin/webpack as it wasn't installed by /Users/davidrhodes/Desktop/biblio/node_modules/@kadira/storybook/node_modules/webpack
@dfrho could you give more details how to reproduce this issue:
Which way did you install Storybook into your project?
We're release a new version real soon. You can try it already.
In a react project directory:
npm i @storybook/cli@alpha
getstorybook
How to uninstall storybook from the react project ?
what is the command to uninstall storybook.
npm uninstall -g @storybook/cli
isn't seem to work as expected.
We don't have a cli command to automate this.
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.
I understand it's a chore to follow the above list of steps manually. I agree.
I'm open to debating this, if you have a suggestion on how to approach this in a safe manner, I'm all ears.
Hi ndelangen, Thanks for your great description for removing storybook. Here I would like to provide more specific details.
delete the .storybook folder
delete scripts and dependencies from package.json (usually, delete every single line which contains 'storybook')
run npm install
(*this is important. Don't run npm update
as npm update
updates every single dependencies that might break the dependency graph of the project and cause error when you run project)
Most helpful comment
We don't have a cli command to automate this.
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.
I understand it's a chore to follow the above list of steps manually. I agree.
I'm open to debating this, if you have a suggestion on how to approach this in a safe manner, I'm all ears.