klaviyo / klaviyo-api-node

Node sdk for the Klaviyo API
43 stars 12 forks source link

Getting axios is not function issue #63

Open AkashLakade opened 4 weeks ago

AkashLakade commented 4 weeks ago

App.tsx:20 TypeError: axios is not a function at profilesApi.ts:182:1 at new Promise () at BackOff.request (profilesApi.ts:181:1) at BackOff. (backoff.ts:32:1) at step (events.js:497:1) at Object.next (events.js:497:1) at fulfilled (events.js:497:1)

see the console

Node version- 20

Provide the steps to integrate in react app 

Need Help to solve this issue
Ian-Montgomery-Klaviyo commented 3 weeks ago

This application is build specifically for the node.js backend environment, and won't function in a frontend react app. Klaviyo has a different series of endpoints (not included in this package) for calling from the frontend. These are designated with the /client/ route (here is an example), some common functionality is included a lightweight web package that you can read about here.