Cannot find module 'react/package.json'
See original GitHub issueDescribe the bug npm run storybook Cannot find module ‘react/package.json’
To Reproduce Steps to reproduce the behavior:
npm init
npx -p @storybook/cli sb init --type react
npm run storybook
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Cannot find module 'react' - Stack Overflow
Your package.json doesn't have React in it. It's pretty hard for your project to use a package you haven't installed. Just add: "react":...
Read more >npm run storybook blocked by "Cannot find module 'react ...
I cannot run `npm run storybook`. And this is the message I got: ... Error: Cannot find module 'react/package.json' ERR! Require stack: ERR!...
Read more >Cannot find module 'react' Error in TypeScript | bobbyhadz
To solve the "Cannot find module react or its corresponding type declarations" error, install the module and its type definitions by running the...
Read more >Fix - Cannot find module 'react' error - Reactgo
The can't find module 'react' error occurs, if you're trying to access a react module that is not currently installed in your project....
Read more >Error "Cannot find module 'react' or its corresponding type ...
If the error is not resolved, try to delete your node_modules and package-lock.json files, re-run npm install and restart your IDE. You can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also need to have react-dom installed as a dev dependency.
Check if you have added react as part of peer dependencies. It has to be there in dependencies also.