twitter-text
twitter-text copied to clipboard
autoLinkWithJSON is not a function
I've used twitter-text in my JS project before and for maintaining reasons updated the project today. twitter-text was updated from 3.0.1
to 3.1.0
as per package.json.
Now I get the following error: "twitterText.autoLinkWithJSON is not a function".
Obviously sth. has changed in the way the package works. I'm clueless what though. Any help appreciated.
maybe same issue
Uncaught TypeError: twitter_text_1.parseTweet is not a function
It seems that's because package.json is a bit changed here https://github.com/twitter/twitter-text/pull/310/files#diff-e51a40ac250c9696142466f114f754161e7e5102c0cdb5354548b757deb272f6R6
"module": "dist/esm",
I'm not sure why the line is added, but when I removed the line (which means we use dist/index.js, not dist/esm/index.js), there's no error