# How to validate a certificate from JS/TS

**URL:** <https://forum.dfinity.org/t/how-to-validate-a-certificate-from-js-ts/33504>\
**Category:** Language Support\
**Tags:** Motoko\
**Created:** [July 22, 2024, 2:45pm UTC](https://forum.dfinity.org/t/how-to-validate-a-certificate-from-js-ts/33504 "2024-07-22T14:45:27Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [September 24, 2024, 1:04pm UTC](https://forum.dfinity.org/t/how-to-validate-a-certificate-from-js-ts/33504/21 "2024-09-24T13:04:07Z")

</div>

Oh gosh…mine is a mess because somewhere along the line there was some js that didn’t have typescript definitions or something like that so I have babel transforms and someother things going on and when I imported that package I started getting to the “can’t use require” or “not a common module” malarkey that I just am not close enough to js to really know my way around at this point. You can track my mess if you really want to at this thread where I tried to unsuccessfully diagnose it: [ChatGPT - Jest Transform Configuration Issue](https://chatgpt.com/share/66f2b85e-5e3c-8007-b049-4783804f4f69)

Once you have the npm package fixed to point to the TS version instead of the js version I can try again.(Maybe you’ve already done that)

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [September 24, 2024, 1:12pm UTC](https://forum.dfinity.org/t/how-to-validate-a-certificate-from-js-ts/33504/22 "2024-09-24T13:12:12Z")

</div>

> [@skilesare](#):
>
> “can’t use require” or “not a common module”

Ah yes… This is a really big problem lately where some packages move to the newer ESM format, drop support for legacy formats, but then there are still projects only supporting legacy and not ESM format. It’s a complete mess regardless of how close you are to JS.

Let’s not open that can of worms then 😄

> Once you have the npm package fixed to point to the TS version instead of the js version I can try again

Not yet, there’s some pending breaking changes that we need to finish addressing, I’ll let you know once it is released.

[Previous page](https://forum.dfinity.org/t/how-to-validate-a-certificate-from-js-ts/33504.md?page=1)
