klaviyo-api-node icon indicating copy to clipboard operation
klaviyo-api-node copied to clipboard

Cannot read properties of undefined (reading 'Z_SYNC_FLUSH')

Open octave opened this issue 2 years ago • 3 comments

Added the latest 6.0.0 version to my Hydrogen/Remix project. And I can't even start my app:

TypeError: Cannot read properties of undefined (reading 'Z_SYNC_FLUSH')
    at node_modules/axios/dist/node/axios.cjs (/node_modules/axios/lib/adapters/http.js:29:25)
    at node_modules/klaviyo-api/dist/api/accountsApi.js (/node_modules/klaviyo-api/api/accountsApi.ts:13:1)

octave avatar Sep 22 '23 17:09 octave

Looks like this is an error with axios. I changed the way axios is imported in today's 6.0.1 release as a potential fix that was outlined in this axios issue. Let us know if fix works or we need to connect farther to find a working solution.

Ian-Montgomery-Klaviyo avatar Sep 22 '23 18:09 Ian-Montgomery-Klaviyo

Thanks for your quick reply! I just tried with 6.0.1 and same error.

In the meantime I switched to using the api with fetch which works fine.

octave avatar Sep 22 '23 18:09 octave

@octave how did you manage to switch to using fetch? im running into the exact same issue

umxr avatar May 02 '24 14:05 umxr