Clicky

SourceCoded

Svelte and Axios

Published Oct 18, 2021

I was experimenting with Svelte these days and, on trying to integrate it with Axios, I was confronted with the following error:

    Uncaught TypeError: can't convert undefined to object
        mergeConfig  mergeConfig.js:92
        create       axios.js:27
        app          http.js:3
        <anonymous>  bundle.js:3922

Apparently there is not much information on the subject so, I asked on the Discord Channel and was promptly answered with this link: https://stackoverflow.com/questions/69420370/async-axios-call-not-executed-in-svelte-trying-to-use-the-result-raises-a-typee

TL;DR

Downgrade Axios to version 0.21.1 to solve the issue.