Closed mashirozx closed 1 year ago
I'm not sure is my configuration is correct?
Thanks for reporting.
I thing this is a bug. It should work.
I wont be able to patch before tonight. 😕
Never mind, thank you
Hi @mashirozx,
I'm sorry but I can't reproduce.
I've updated the demo repo, it work as expected.
Maybe it was only a teporary issue?
@garronej Hi, thanks! I noticed something like this:
There is no export of AxiosResponse
and AxiosRequestConfig
in axiod. Will it be the reason of this error message?
Hi @mashirozx,
With this exact import statment and axiosd as polifill (just like you did) I'm not getting any error message compile time nor runtime...
maybe you can provide a reproduction path with a fork of the demo setup: https://github.com/garronej/my_dummy_npm_and_deno_module
@garronej Thanks for the reply, tried the same as the sample (I think), but really don't know why it trying to fetch axiod 1.3.6 on deno land, which is only the axios version:
This is my project, if it's convenient for you, please have a look 🙏: https://git.mashiro.top/test/megalodon/-/tree/master/megalodon
@mashirozx,
The problem is with src/axios.d.ts
, Denoify don't know what to make of it.
You can either tell denoify to ignore this file:
src/axios.d.ts
// @denoify-ignore
declare module 'axios/lib/adapters/http'
https://docs.denoify.land/special-comments
Or provide a specific implémentation for deno
src/axios.d.deno.ts
declare module "foo" {
export default function foo(): string;
}
Denoify will just cp src/axios.d.deno.ts deno_dist/axios.d.ts
Hope it helps.
You are right! thanks a lot! ❤️
Node.js v18.16.0 Denoify 1.5.3
I just want to replace npm lib axios with deno lib axiod, my configuration:
related issue: #60