CoAP client how to use with ionic2?

Hi guys, I have a really big problem. I need to use CoAP service for my app for college project but I dont know how to use it with ionic.
I found library on github: https://github.com/mcollina/node-coap, so when I import it with help of this link https://ionicframework.com/docs/v2/resources/third-party-libs/ and start it with ionic serve, erorrs are starting to showing me in chrome console.
So, is there anyone who has encouter with this?