-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Error: You attempted to import react which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. #50
Comments
I tried this for the windows platform, and am experiencing the same problem. Same thing probably applies to other projects such as web... But it's not doing that. I'm a bit too unfamiliar with hoisting and how these node_modules are loaded. But to me it seems it's not traversing to the right directory. It could be that I haven't symlinked correctly because of the workspace... Some more information in the usage of the repo would be nice.... Maybe because of the nohoist deprecation?
|
anyone having the same issue, adjusting your craco.config.js file with the following solves the issue
also update your craco to v7 , read more here dilanx/craco#475 |
Yes, I am having the same issue with my windows build, which local image asset e.g. .png cannot be found as well would love to hear if there's any solution to this.
`` the metro.config.js
Build environment
|
Compiled with problems:X
ERROR in ../app/src/index.js 5:0-85
Module not found: Error: Can't resolve 'react-native' in 'C:\wamp64\www\goolaMonoRepo\packages\app\src'
ERROR in ./src/index.js 4:0-26
Module not found: Error: You attempted to import C:\wamp64\www\goolaMonoRepo\packages\web\node_modules\react which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.0
The text was updated successfully, but these errors were encountered: