Exponent-server-sdk-node


#1

I’m trying to implement exponent push notifications in my app but when I run yarn add exponent-server-sdk on my terminal I get No lockfile found… TypeError: Cannot read property ‘name’ of null. can someone please help me with this issue?


#2

Hi there – this seems like a problem with your local Yarn installation.

Can you try upgrading Yarn to the latest version and trying again?

If all else fails, feel free to use NPM.


#3

Hello @skevy – I just tried yarn self-update but got an error OAuth2 authentication requires a token or key & secret to be set… Have you any idea what does this mean? and what’s the difference if I use npm?


#4

We don’t control Yarn – I’m not sure why you would be getting an OAuth error when trying to update Yarn.

Using NPM should be fine for you – Yarn can sometimes provide a speed increase, but I think you should just use NPM.


#5

So by using npm install exponent-server-sdk I can get access to the sendPushNotifications function from the exponent-server-sdk module?


#6

@ahmad Yes. That’s correct.


#7

I got a new error saying: Unable to resolve module ‘zlib’ from '/…/nod_modules/exponent-server-sdk/build/ExpoClient.js’
Module does not exist in the module map… is this because I’m using it in the app while I should use it as a separate server?


#8

Yes - exponent-server-sdk is for use with a node server.


#9

@ccheever can you please guide me on how to exactly write a push notification server or socket for exponent being it node or python? I mean should I just create a host server and then add these functions to it and then just run the server? Just some pointer tips would be appreciated… Thanks for your time.