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:, so when I import it with help of this link and start it with ionic serve, erorrs are starting to showing me in chrome console.
So, is there anyone who has encouter with this?