Thursday, 1 October 2020

How to use "node-binance-api" in NativeScript

I have tried using this https://www.npmjs.com/package/node-binance-api in a NativeScript project but some of its dependencies are not supported by NativeScript so would show errors.

WARNING in ../node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/home/user/Typescript/PaperGUI/node_modules/ws/lib'
 @ ../node_modules/ws/lib/buffer-util.js
 @ ../node_modules/ws/lib/receiver.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/node-binance-api/node-binance-api.js


WARNING in ../node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/home/user/Typescript/PaperGUI/node_modules/ws/lib'
 @ ../node_modules/ws/lib/validation.js
 @ ../node_modules/ws/lib/receiver.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/node-binance-api/node-binance-api.js
 


ERROR in ../node_modules/socks-proxy-agent/index.js
Module not found: Error: Can't resolve 'dns' in '/home/user/Typescript/PaperGUI/node_modules/socks-proxy-agent'
 @ ../node_modules/socks-proxy-agent/index.js 7:10-24
 @ ../node_modules/node-binance-api/node-binance-api.js


ERROR in ../node_modules/debug/src/node.js
Module not found: Error: Can't resolve 'net' in '/home/user/Typescript/PaperGUI/node_modules/debug/src'
 @ ../node_modules/debug/src/node.js 193:16-30
 @ ../node_modules/debug/src/index.js
 @ ../node_modules/https-proxy-agent/index.js
 @ ../node_modules/node-binance-api/node-binance-api.js


ERROR in ../node_modules/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in '/home/user/Typescript/PaperGUI/node_modules/forever-agent'
 @ ../node_modules/forever-agent/index.js 7:10-24
 @ ../node_modules/request/request.js
 @ ../node_modules/request/index.js
 @ ../node_modules/node-binance-api/node-binance-api.js
 

This isn't the complete error but since most of the error are just a repeat of the missing modules i just put one of each of the missing modules.

Thanks



from How to use "node-binance-api" in NativeScript

No comments:

Post a Comment