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?
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.
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?
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.
So by using npm install exponent-server-sdk I can get access to the sendPushNotifications function from the exponent-server-sdk module?
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?
Yes - exponent-server-sdk is for use with a node server.
@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.