1

I'm creating an application to expose an NFT collection.

I already started to make my application using a normal React APP. I made the entire site using .js and .jsx, but now the most important part is missing, the CandyMachine.

But I don't find candy-machine.js. Only using Typescript.

Does anyone know if there is a CandyMachine Metaplex in Javascript? Or do I have to convert my entire application to Typescript?

2 Answers 2

1

Your application doesn't need a candy-machine, it's entirely on-chain. You can learn more on creating one at this tutorial via the CLI... and if you need a front-end for it, then check out this Candy machine UI guide and here's the repo https://github.com/metaplex-foundation/candy-machine-ui

3
  • Hi OneFish, how are you? I understand, thanks for your time. I had already gone through these documents, I managed to "translate" the files into .js, but I'm having problems with some dependencies (@solana/wallet-adapter-...), I'm still studying. But I still have doubts, Can I use a Typescript component inside a Javascript application? Or does this question make no sense? Commented Sep 3, 2022 at 11:56
  • Glad I could help. Shouldn't be a problem introducing TypeScript to your existing .js codebase... better to stick to one, but there's no need to translate .ts over to .js if you don't want to. Also, all JavaScript is syntactically valid TypeScript ... for example you can rename your .js files to .ts Commented Sep 4, 2022 at 12:30
  • Awesome OneFish.. I think I could do this.. but its good hear from someone.. thank you!!!! Commented Sep 4, 2022 at 13:17
0

I couldn't exactly solve the problem, in fact it was giving a compatibility error in webpack.

I used the Solana Labs starter template, migrated my entire application to this starter kit.. and now everything works perfect now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.