I have this project structure for my native app and it was working in SDK 29
My rn-cli-config.js was resolving paths outside “native” directory and was providing node modules to this paths.
Now it is not resolving any paths and i assume my rn-cli-config.js not working at all.
rn-cli-config.js
const path = require('path');
const installedDependencies = require("./package.json").dependencies;
const extraNodeModules = {};
Object.keys(installedDependencies).forEach(dep => {
extraNodeModules[dep] = path.resolve(__dirname, "node_modules", dep);
});
module.exports = {
getProjectRoots() {
return[
path.resolve(__dirname),
path.resolve(__dirname, '../requester'),
path.resolve(__dirname, "../store"),
path.resolve(__dirname, "../reducers"),
path.resolve(__dirname, "../actions"),
path.resolve(__dirname, "../hocs"),
path.resolve(__dirname, "../middlewares"),
path.resolve(__dirname, "../utils"),
]
},
extraNodeModules: extraNodeModules
};
Part of app.json for including rn-cli-config.js
"packagerOpts": {
"projectRoots": "",
"config": "rn-cli.config.js"
}