klaviyo-api-node
klaviyo-api-node copied to clipboard
Cannot read properties of undefined (reading 'Z_SYNC_FLUSH')
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)
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.
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 how did you manage to switch to using fetch? im running into the exact same issue