react-native项目中无法使用zeromq遇到的坑

npm install之后,加载zeromq时候直接报错

error: bundling failed: Error: Unable to resolve module `../build/Release/zmq.node` from `C:\Users\dongwy\Desktop\deascBook\cod
e\reboot\node_modules\zeromq\lib\index.js`: The module `../build/Release/zmq.node` could not be found from `C:\Users\dongwy\Des
ktop\deascBook\code\reboot\node_modules\zeromq\lib\index.js`. Indeed, none of these files exist:

但是用node直接运行项目是可以使用的,这个问题google,百度,翻阅各种资料,

尝试使用过react-native-webpack-server先加载node模块再使用package.json里面的模块数据,。。

各种方法使用之后皆不可得,

最后翻阅资料得出的结论是:node zmq模块在java底层实现的时候无法解析,所以不得己让后台更换webscocket.

posted @ 2018-12-03 15:29  大梦初醒的董大先生  阅读(736)  评论(0)    收藏  举报