T cannot be found in Js


Hello, I’m kinda new in Reason, I’m trying to use bs-axios, creating an instance with it, Im trying to set the ~params labeled parameter, it request me a Js.t('a) type but writing a Js.t object it gives me the next message: t cannot be found in Js.

I hope you’re having a good day!


You can create objects in a couple of different ways, one of the simplest is using the syntax sugar: https://bucklescript.github.io/docs/en/object-2#literal


Hey @notpineapple, I hope you figured it out. This is how an bs-axios instance looks like in one of my projects:

let instance =
      ~headers={"Authorization": "Bearer " ++ accessToken},

If you are still not able to get it to work, can you share the object you wrote?


Thank you so much for your answers, i could get it with the syntatic sugar %bs.obj form @yawaramin answer.

@ben i’ll try the way you do.

Besides that can you explain me why is not finding t in Js?

I hope you’re having a good day.


Can you post the code and the error message? That will help to identify the exact issue and explain it.