pusher / chatkit-server-node

Node.js SDK for Pusher Chatkit
https://pusher.com/chatkit
MIT License
16 stars 9 forks source link

Attempting to import the Node standard library module "url" #33

Closed vishesh774 closed 5 years ago

vishesh774 commented 5 years ago

What?

I am trying to use the chatkit-server in a react-native app along with expo. During the dev running itself, i get the following compilation error:

The package at "node_modules/@pusher/platform-node/target/base_client.js" attempted to import the Node standard library module "url". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo

Can someone help me along with this?

Suggested improvements

hamchapman commented 5 years ago

This SDK isn't intended to be used as part of a client app. It relies on an instance's key being provided, which must remain secret. So having that on a client app isn't really a viable option.

That said I'd be interested to hear what the use case is for wanting to use this SDK as part of your react native app?

hamchapman commented 5 years ago

Closing as stale. Feel free to elaborate though @vishesh774, if you'd still like to