Strange: after installing Knobs addon, react won't work
See original GitHub issueI just encountered really strange bug: I am using create-react-app with custom-scripts. Everything working fine, webpack builds page correctly. I have then installed stoybooks, fine, set it up, then copied a story from other project, that was using knobs. As my storybooks shouted that Module not found: Error: Can't resolve '@storybook/addon-centered, I’ve done npm install @storybook/addon-knobs, re-launched webpack with yarn start and…
./src/index.js Module not found: Can't resolve 'react' in 'E:\myapp\src'
That was something unexpected. Tried multiple times with both yarn and npm, but neither worked. I have uninstalled knobs with $ npm uninstall @storybook/addon-knobs and after that my app started working flawlessly again.
What can be causing that? How’s possible knobs deleted react?
My uninstallation log:
npm` WARN deprecated babel-preset-es2015@6.24.1: ð Thanks for using Babel: we recommend using
babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN react-modal@2.3.3 requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-modal@2.3.3 requires a peer of react-dom@^0.14.0 || ^15.0.0 but none was installed.
npm WARN @storybook/react-fuzzy@0.4.0 requires a peer of react@^0.14.7 || ^15.0.0 but none was installed.
npm WARN react-komposer@1.13.1 requires a peer of react@^0.14.3 || ^15.0.0 but none was installed.
npm WARN react-icons@2.2.5 requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-icons@2.2.5 requires a peer of react-dom@^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-komposer@2.0.0 requires a peer of react@^0.14.7 || ^15.0.0 but none was installed.
npm WARN react-treebeard@2.0.3 requires a peer of react@^15.5.4 but none was installed.
npm WARN react-treebeard@2.0.3 requires a peer of react-dom@^15.5.4 but none was installed.
npm WARN react-simple-di@1.2.0 requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-stubber@1.0.0 requires a peer of react@^0.14.7 || ^15.0.0 but none was installed.
npm WARN radium@0.19.4 requires a peer of react@^15.3.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 366 packages, removed 26 packages, updated 33 packages and moved 4 packages in 46.114s
Is that right that UNinstalling added 366 packages? I don’t exactly get it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
@pauldariye try reinstalling your dependencies and check that you have react installed as well.
The issue may have been with my node version.