Storybook throws: Cannot find module 'react/package.json'

Viewed 89

I'm developing a react library using rollup as a bundler.

When running storybook, I have the following error thrown by storybook:

ERR! Error: Cannot find module 'react/package.json'

react and react-dom packages are listed as peerDependencies along with the rollup-plugin-peer-deps-external package in rollup to exclude them from being bundled with the library.

In my rollup config, I also put these packages in the external entry.

Can someone help, please?

0 Answers
Related