words-to-numbers icon indicating copy to clipboard operation
words-to-numbers copied to clipboard

Uncaught TypeError in Typescript

Open DestinyIJ opened this issue 3 years ago • 5 comments

clj-fuzzy.js:2 Uncaught TypeError: Cannot use 'in' operator to search for 'clj_fuzzy' in undefined Capture

DestinyIJ avatar Feb 10 '23 14:02 DestinyIJ

Same thing happening to me when using Vite

stevenschemers avatar Jun 02 '23 16:06 stevenschemers

Repro:

     const moduleUrl = 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';

    try {
        const wordsToNumbersModule = await import(moduleUrl);
        console.log(wordsToNumbersModule.default('one hundred'));  // Should output 100
    } catch (error) {
        console.error('Failed to load module:', error);
    }

https://jsfiddle.net/6vxg5ae0/

Aivean avatar Sep 17 '23 22:09 Aivean

Can confirm... I ran into the same issue using this library for a React app.

I suspect the error refers to the clj-fuzzy library, which has been deprecated, for the talisman library.

I made the necessary changes in my PR :)

csp197 avatar Oct 27 '23 17:10 csp197

Awesome, thanks @CSP197 !! When do you think your PR will be incorporated into a new version now that it's approved? I'm facing this same issue right now with a rollup bundle

pmalacho-mit avatar Nov 28 '23 23:11 pmalacho-mit

Hi @pmalacho-mit, I don't have write access to this repo, so I believe only the repo maintainer, @finnfiddle, can merge this PR.

csp197 avatar Dec 06 '23 13:12 csp197