messagebird / messagebird-nodejs

The open source Node.js client for MessageBird's REST API
https://www.messagebird.com/developers
105 stars 44 forks source link

React Native (Expo) error message on app launch #80

Closed asalha closed 3 years ago

asalha commented 3 years ago

I run: expo start -c

And I get the following message:

InkedWindowsTerminal_Zi9wbGZ7Ug_LI

Response code: 500

Inkedqemu-system-x86_64_gwKSqQIJHD_LI

aodinok commented 3 years ago

Hey @asalha

messagebird-nodejs package is not fully compatible with React Native as it's name suggests

It is using 'https', 'querystring' modules that are automatically provided by nodejs. These modules are available in Node, but they are not automatically available in other environments such as browsers and in this case React Native.

There are some ways to kind of "polyfil" those modules and include core node modules in React Native. You can check something like ReactNativify to do it.