Closed viper4595 closed 5 years ago
do you have react-native-tcp installed and linked? It's the shim for the net
module
Tks for reply!
Yes, i has already installed and linkd react-native-tcp. It also working when i import to a react native js file.
does your package.json have a mapping in the browser
or react-native
field from net to react-native-tcp? e.g.:
package.json:
...
"browser": {
"net": "react-native-tcp"
},
...and/or...
"react-native": {
"net": "react-native-tcp"
}
yes, i did it as well. My package .json has both browser and react-native with net: react-native-tcp in.
if you installed anything after running rn-nodeify
, you need to re-run it, as it fixes package.json browser+react-native mappings deep into the node_modules/ tree. Try re-running it and see if it helps
hi, i try to re-run it many times and it still does not understand my 'net' module was replaced by react-native-tcp :(
@viper4595 sorry for the slow response. If you have a link to your project, i can take a quick look
Hi,
I use this library for my project: https://github.com/nayrnet/node-hikvision-api.
After implement all steps, the library keep showing up error: unable to resolve modules 'net' from /node_modules/[lib_name].
My react native version is: 0.56.0