javascript - Regarding the node_modules reference path problem of react natived
漂亮男人
漂亮男人 2017-06-05 11:11:45
0
1
664

Currently there are multiple projects, all of which are in /work/project
Each project uses a module: A

According to npm's search order, if the module is not found in the node_modules of the current project, it will search in the node_modules of the parent directory. However, the node_modules of the parent directory clearly contains the module react native, but an error is reported saying that it is not there.
What causes this?

Although I can install this module into node_modules in each project, because this module A will be modified every day, sharing one is the best way. How to achieve this requirement?

漂亮男人
漂亮男人

reply all(1)
巴扎黑
import ReactNativeDeviceInfo from '../../react-native-device-info';
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template