Describe the bug
When upgrading from Storybook 4.1.13 to 5.0.0, an attempt to run start-storybook results in the error message Error: Cannot find module '@emotion/core/package.json.
There is no node_modules/@emotion/core folder. The only copy that gets installed is due to the dependencies within @storybook/[email protected], so it's not at the top-level node_modules folder, but instead at node_modules/@storybook/theming/node_modules/@emotion/core.
To Reproduce
Steps to reproduce the behavior:
@storybook/[email protected]
@storybook/[email protected]
@storybook/[email protected]
@storybook/[email protected]
@storybook/[email protected]
> yarn remove @storybook/addon-options
> yarn upgrade --latest @storybook/react @storybook/addon-actions
@storybook/addon-knobs @storybook/@addon-storyshots
> yarn add --dev --exact @babel/core babel-loader
> yarn run start-storybook -- -p 9001
Environment
Windows 10
node 10.15.0
yarn 1.13.0
Additional context
Removing yarn.lock and node_modules and reinstalling purely from the package.json file also fails.
Note that installing @storybook/theming fixes the error - is this package now mandatory?
Should not be mandatory. We're still trying to get to the bottom of this -- feels like a yarn bug, but it's all pretty opaque. @emotion/core and @storybook/theming are def in your dependency tree, but they are just not getting hoisted properly AFAIK.
Im getting the exactly same error with npm and package-lock. Error: Cannot find module '@emotion/core/package.json'
Resolving this as a duplicate to https://github.com/storybooks/storybook/issues/5817
We still don't know what's going on tho