我正在尝试通过npm redis连接到redis服务器 . 在创建react-native app时 .

我正进入(状态

Haste模块映射中不存在node_modules / redis / index.js : Module net`

这可能与https://github.com/facebook/react-native/issues/4968有关 . 要解决此问题,请尝试以下方法:1 . 清除守望者 Watch :watchman watch-del-all . 2.删除node_modules文件夹:rm -rf node_modules && npm install . 3.重置Metro Bundler缓存:rm -rf / tmp / metro-bundler-cache- *或npm start - --reset-cache . 4.删除急速缓存:rm -rf / tmp / haste-map-react-native-packager- * .

我想知道我们可以在构建反应本机应用程序时使用普通的npm模块吗?

要么

我如何通过react-native连接到Redis