You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running - "react": "16.0.0-alpha.6", "react-native": "0.44.0",
Folder Structure
-- parent
-- package.json {"name":'parent'}
-- mobile
-- app
-- modules
-- login
-- Login (import { loginAPi } from 'parent/src/data/api')
-- src
-- package.json {"name": "source"}
-- data
-- package.json {"name": "data"}
-- api
-- package.json ({"name":"api"})
-- index.js
packager console:
error: bundling: UnableToResolveError: Unable to resolve module `parent/src/js/data/api` from `/Users/../../../../mobile/app/modules/login/Login.js`:
Module does not exist in the module map or in these directories:
/Users/../../../parent/mobile/node_modules/parent/src/js/data
/Users/../../../parent/node_modules/parent/src/js/data
/Users/../../../node_modules/parent/src/js/data
NOTE- Web application which is in src has been already developed and has considerable code, and the team is just starting with the react-native set up. We want to use the data part of the web application in the mobile.
Need help getting things right.
The text was updated successfully, but these errors were encountered:
I am trying to share code between my web and mobile. I have gone through this thread/issue which is same as mine.
Unfortunately @dutzi's solution does not seem to work with react-native@0.44.0.
Also this post here says it is not allowed to fetch from outside of your React Native Project root.
I have followed this medium article and other such sources which suggest similar way.
Stack overflow question for the same.
I am running -
"react": "16.0.0-alpha.6", "react-native": "0.44.0",
Folder Structure
packager console:
NOTE- Web application which is in
src
has been already developed and has considerable code, and the team is just starting with the react-native set up. We want to use the data part of the web application in the mobile.Need help getting things right.
The text was updated successfully, but these errors were encountered: