appfeel / node-pushnotifications

Push notifications for GCM, APNS, MPNS, AMZ (automatic detection from device token)
MIT License
534 stars 126 forks source link

TypeError: this is not a typed array. #32

Closed munyanyika24 closed 7 years ago

munyanyika24 commented 7 years ago

I am getting the following error message:

TypeError: this is not a typed array. when i attempt to do a push using the sample Nodejs code

Below is error log output:

at Function.from (native) at Object.<anonymous> (/Users/codehacker/Documents/projects/nodeProjects/barterfarm/node_modules/node-pushnotifications/node_modules/apn/lib/protocol/endpoint.js:17:31) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object.<anonymous> (/Users/codehacker/Documents/projects/nodeProjects/barterfarm/node_modules/node-pushnotifications/node_modules/apn/index.js:27:18) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object.<anonymous> (/Users/codehacker/Documents/projects/nodeProjects/barterfarm/node_modules/node-pushnotifications/lib/sendAPN.js:3:11)

Please assist with this, as soon as you can

munyanyika24 commented 7 years ago

This is related to the version of node that i was using on mac

Download the the .pkg file from the Node website and reinstall it on your machine.