How to use heartland-nodejs NPM module in angular2+ appilcation..?

9 views
Skip to first unread message

S.M.V.Bharathiraja Vetharethinam

unread,
Mar 15, 2018, 3:13:12 AM3/15/18
to Angular and AngularJS discussion

Hi Guys...
I want  to use heartland payment gateway in my Angular 2+ application...
I installed that heartland-nodejs NPM module in my Angular 2+ app...
When i Import that heartland module...
var heartland = require("heartland-nodejs");
it Shows some errors....
Uncaught TypeError: exists is not a function
    at Function.getRoot (webpack-internal:///../../../../bindings/bindings.js:158)
    at bindings (webpack-internal:///../../../../bindings/bindings.js:60)
    at eval (webpack-internal:///../../../../node-expat/lib/node-expat.js:4)
    at Object.../../../../node-expat/lib/node-expat.js (vendor.bundle.js:1107)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.eval (webpack-internal:///../../../../heartland-nodejs/lib/soap/wsdl.js:8)
    at eval (webpack-internal:///../../../../heartland-nodejs/lib/soap/wsdl.js:1004)
    at Object.../../../../heartland-nodejs/lib/soap/wsdl.js (vendor.bundle.js:895)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.eval (webpack-internal:///../../../../heartland-nodejs/lib/soap/index.js:11)
Plz help me to solve this....

Sander Elias

unread,
Mar 15, 2018, 12:23:36 PM3/15/18
to Angular and AngularJS discussion
Hi SMV,

I took a quick glance at your library. It seems to be a pure nodeJS library, that does not support being loaded into a frontend. It's depended on nodeJS API's that are not available in the browser. 
If you need something to interface with their API, contact them, and ask for a front-end solution.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages