Tcgdex typescript sdk not working #760
Replies: 5 comments
-
💬 narukaioh on Discord wrote: try: "import { PokemonTCG } from 'pokemon-tcg-sdk-typescript'" |
Beta Was this translation helpful? Give feedback.
-
💬 _daronnn on Discord wrote: But thats for another api bro |
Beta Was this translation helpful? Give feedback.
-
💬 avior on Discord wrote: sry for the late reply, if you didn't solve your problem, do you know what would output |
Beta Was this translation helpful? Give feedback.
-
💬 _daronnn on Discord wrote: Same |
Beta Was this translation helpful? Give feedback.
-
💬 avior on Discord wrote: could it be possible to send me the code so that I can review what's wrong ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
💬 _daronnn on Discord wrote:
I tried to use the Tcgdex sdk on my native react project using tsx, but it isn't working, there's an error : Uncaught (in promise) TypeError: _sdk.default is not a constructor, here is my code to show you if i did a mistake or if just the sdk isn't working : ```import '@/assets/css/glocal.css';
import Header from '@/components/HeaderApp';
import TCGdex from '@tcgdex/sdk';
export default function HomeScreen() {
return (
TEst
<div onClick={() => ChooseSeriesLanguage("fr")}>Fr
<div onClick={() => ChooseSeriesLanguage("jp")}>Jp
)
}
async function ChooseSeriesLanguage(lang){
const tcg = new TCGdex(lang);
(async () => {
// Card will be Furret from the Darkness Ablaze Set
const card = await tcg.fetch('cards', 'swsh3-136');
console.log(card);
})();
}```
Beta Was this translation helpful? Give feedback.
All reactions