Start storybook fail after installing storybook 5 because of missing dependencies.
*Module not found: Error: Can't resolve '@emotion/core' in '/my-package/node_modules/emotion-theming/dist'
Dependencies:
@emotion/core
@emotion/styled
Maybe @storybook/react should include these dependencies?
For now i installed the dev dependencies manually:
npm i @emotion/core@^10.0.7 -D && npm i @emotion/styled@^10.0.7 -D
I solved it by removing node_modules and package.lock.json + npm install
Also getting this error. Removing node_modules and *.lock files had no effect.
Removing the addons-options (which is deprecated) fixed it for me. Removing the lock file it's a bit of a last resort move (in my opinion)
I got the same error after upgrading to 5.0.0. Fixed it by removing node_modules and the lockfile (no addons-options dependency) but it shouldn't be necessary in my opinion.
As #5942 was closed as a duplicate of this, adding what I said there:
yarn.lock and node_modules and reinstalling from package.json only did _not_ work@storybook/theming does work (hoists @emotion/core up to the top level of node_modules)Sorry @sargant I goofed. https://github.com/storybooks/storybook/issues/5817 has more info and is also a dupe. Resolving this one also as a dupe. Thanks for your patience.
Most helpful comment
As #5942 was closed as a duplicate of this, adding what I said there:
yarn.lockandnode_modulesand reinstalling frompackage.jsononly did _not_ work@storybook/themingdoes work (hoists@emotion/coreup to the top level ofnode_modules)