shrimpy-node icon indicating copy to clipboard operation
shrimpy-node copied to clipboard

how to embed in angular project?

Open vmavromatis opened this issue 4 years ago • 0 comments

Hi all is there any code example so I can achieve to embed this in an ng project (ionic)? I have tried adding node types in my tsconfig or different modules such as commonjs but to no avail. I have also manually added the js files as scripts inside my angular.json

I keep receiving this error: Uncaught ReferenceError: exports is not defined

Here is the relevant part of my code

import { ShrimpyApiClient } from 'shrimpy-node';

  SDKTest() {
    console.log('TEST1')
    const publicClient = new ShrimpyApiClient(); //<-----------ERROR Error: Uncaught (in promise): ReferenceError: process is not defined
    publicClient.getTicker('kucoin').then(data =>{console.log('TICKER: ', data)}).catch(error =>{});
    publicClient.getSupportedExchanges().then(data =>{console.log('EXCHANGES: ', data)}).catch(error =>{});
}

Thanks!

vmavromatis avatar Feb 23 '21 17:02 vmavromatis