Monday 12 June 2017

React Native submodule depends on Node only package

I am developing a React Native application that is basically planning to reuse code from an existing React/Redux web app. I have already set up a Redux store entry point for the React Native app so now I have to import the store from the web app.

I have brought the web app as a git submodule into the RN repository and export the store.

This is how the RN app package.json declares the web app dependency, so it also installs all of the web app dependencies:

{ "name": "ReactNativeApp", "dependencies": { "webApp": "file:src/webAppDir/client" } }

To be clear, src/webAppDir/client contains the web app's package.json (even though the git submodule is src/webAppDir)

I haven’t been able to properly boot the RN app ever since. I get:

Unable to resolve module 'domain' from $PATH. Module does not exist in the module map or in these directories

It then says that domain is not in the node_modules directory of my root nor in the subcomponents. This is true, and a package called asap requires domain. I can't find which other module is requiring asap. domain is a Node core module.

I am recommended to clear watchman watches, delete the modules and then reset the packager cache. Following provides no results.



via FaureHu

No comments:

Post a Comment