Module not found: Error: You attempted to import /node_modules/react-refresh/runtime.js which falls outside of the project src/ directory
See original GitHub issueDescribe the bug related to the new RCA 5 using @storybook/react: 6.4.9 im getting this problem https://github.com/facebook/create-react-app/issues/11810 is there a way to solve it ? if i remove this dependency works good
To Reproduce create a new RCA 5 project, and add storybook and start RCA (yarn start)
“@storybook/addon-actions”: “^6.4.9”, “@storybook/addon-essentials”: “^6.4.9”, “@storybook/addon-links”: “^6.4.9”, “@storybook/node-logger”: “^6.4.9”, “@storybook/preset-create-react-app”: “^4.0.0”, “@storybook/react”: “^6.4.9”,
System
Please paste the results of npx sb@next info here.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Module not found: react-refresh/runtime.js falls outside of the ...
Module not found : Error: You attempted to import .../node_modules/react-refresh/runtime.js which falls outside of the project src/ directory.
Read more >Compilation error due to (non-existant) import of react-refresh
Module not found : Error: You attempted to import /home/newlukai/story/app/node_modules/react-refresh/runtime.js which falls outside of the ...
Read more >module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >@pmmmwh/react-refresh-webpack-plugin - npm
An EXPERIMENTAL Webpack plugin to enable "Fast Refresh" (also known as Hot Reloading) for React components. This plugin is not 100% stable.
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
If you're a developer that works with Node JS and JavaScript libraries and frameworks like React, Vue, and Angular, then you might have ......
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 Free
Top 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
Was able to find a workaround for conflict versions for the time being
npm ls react-refreshand it shows a different ofreact-refreshpackage versionsRan
npm dedupeto de-duplicate multiple versionsRan
npm ls react-refreshto check existing versions forreact-refreshnpm startcompiles & runs successfullySon of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.5 containing PR #17056 that references this issue. Upgrade today to the
@nextNPM tag to try it out!Closing this issue. Please re-open if you think there’s still more to do.