javascript - Importing JS in Angular CLI 1.2.4 -
i trying cound integration existing angular project
https://www.npmjs.com/package/kount-access-api
i installed npm module , in js , not ts , used below lines in angular-cli.json
"scripts": [ "../node_modules/kount-access-api/lib/kount-access-api.js" ],
however getting below error in console,
uncaught referenceerror: require not defined @ eval (eval @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9), :25:14) @ eval () @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9) @ object.../../../../script-loader/index.js!../../../../kount-access-api/lib/kount-access-api.js (kount-access-api.js?9331:1) @ webpack_require (bootstrap a89535f…:54) @ object.2 (scripts.bundle.js:37) @ webpack_require (bootstrap a89535f…:54) @ webpackjsonpcallback (bootstrap a89535f…:25) @ scripts.bundle.js:1
any pointers appreciated
i explored library trying reference , checking its github page says nodejs
library. checked code , referencing needle nodejs
library
/** * required libraries */ // needle needed http calls var needle = require("needle");
check out node_modules\kount-access-api\node_modules\.bin\
, see talking about. won't work in browser.
i have never used kount seams have connect kount server side, not browser/client side.
checkout these links:
Comments
Post a Comment