I think it's fairly common to have miss-matched package dependancies between you main build and storybook which is a pain and always results in downgrading packages. Which isn't a good solution as you end up using older package versions and loosing out on features/fix from the later versions.

I have ran into this on a number of occasions and i have been trying to work out a better may to handle this. First i thought create a node or bash script witch swaps out you package.json depending on if you building the main project or running storybook. This of course is another crap solution as you end up being forced to git ignore your package.lock.json to avoid accidentally committing the storybook lock file and breaking the build on the production server.

There might be multiple ways to solve this issue and it would be nice to hear others for sure.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.