yalc
yalc copied to clipboard
Importing `axios` is not executed crrectly
I'm opening an issue but I think it's more a guidance or discussion sort of question.
I'm developing an SDK and I'm using axios
, imported like suggested in the official documentation
import axios from axios
I then build and publish it locally using yalc publish
and I use the package on my sample problem (running yalc update
). I'm using axios
in a component of the SDK in a very standard way
axios.post(url, params);
The problem is that axios
is a string, specifically this string /static/media/axios.5036f7f7333f291ef6b3.cjs
(I obtain that value by console.log the axios
variable in the SDK code).
So it is not correctly imported. I've always used axios and I've never had this issue before, and if the SDK gets compiled and published, this issue is no more present.
axios
is correctly set as a dependency.
Any idea or suggestion on how to solve this issue? Or someone that has already went through it? Since axios
is one of the most popular libraries, my bet is that someone else already had a similar issue.