question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange: after installing Knobs addon, react won't work

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
danielduancommented, Oct 12, 2017

@pauldariye try reinstalling your dependencies and check that you have react installed as well.

0reactions
dariyecommented, Oct 12, 2017

The issue may have been with my node version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange: after installing Knobs addon, react won't work · Issue ...
I just encountered really strange bug: I am using create-react-app with custom-scripts . Everything working fine, webpack builds page ...
Read more >
Storybook addons not working after migration from 3.x to 5.x ...
For knobs, the message "no knobs found" is displayed. For actions, nothing is displayed at all. For locales, our two different locales (English ......
Read more >
React Storybook Tutorial - 10 - Knobs Addon - YouTube
Courses - https://learn.codevolution.dev/ Support UPI - https://support.codevolution.dev/ Support PayPal ...
Read more >
@storybook/addon-knobs - npm
First of all, you need to install Knobs into your project as a dev dependency. yarn add @storybook/addon-knobs --dev. within .storybook/main.js ...
Read more >
Storybook in React Native - collective:mind | DEV
And when the installation is done, you should see a message saying how you should run it. Install these packages
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found