Closed mshamsi502 closed 10 months ago
i get the error after to init api.init(initConfig) ^ TypeError: Cannot read properties of undefined (reading 'init') cannot read api after import.
api.init(initConfig) ^ TypeError: Cannot read properties of undefined (reading 'init')
import api from 'kucoin-node-api'; const config = { apiKey: kucoinApiKey, secretKey: kucoinApiSecret, passphrase: kucoinApiPassphrase, environment: productionEnv() ? "live" : 'sandbox' }; api.init(config )
after change import api from 'kucoin-node-api'; to import * as api from 'kucoin-node-api'; fix that in ES6 and typescript.
import api from 'kucoin-node-api';
import * as api from 'kucoin-node-api';
i get the error after to init
api.init(initConfig) ^ TypeError: Cannot read properties of undefined (reading 'init')
cannot read api after import.