I have two react apps(A-app, B-app). I need to import one component from A-app to B-app. But when I try to do this I see this error:
./src/App.js Module not found: You attempted to import
../../src/components/Dashboard/container 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/.
I tried to do symlink on this component in B-app node_modules. But it didn't work.
Also I tried to create .env file in the root project directory and put this NODE_PATH=src/
in file. But this didn't work either.
How can I fix this?
Module not found: You attempted to import ../../src/components/Dashboard/container 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/. I think its because I havent .min in my component.