I am trying to import `NPM` module from Kotlin/JS ...
# nodejs
l
I am trying to import
NPM
module from Kotlin/JS project. I followed this guide. https://kotlinlang.org/docs/js-react.html#add-the-video-player-component In the same way, I am trying to import
recharts
from
NPM
, but in the
main.kt
file, I can’t import recharts and it’s submodules. Please somebody help me regarding this if you’d like to do it.
a
you have to generate externals, by adding the third
generateExternals
to the
npm
function or by creating them by hand if it fails for you
l
I know that.
Can you help me with example code plz?
a
what exemple code ?
l
Just using particular dependency from npm. What I am trying to do is to integrate
recharts
module from
NPM
to my Kotlin/JS web project. I followed this tutorial that shows coding example of importing
react-player
module from
NPM
but it doesn’t work on me. Please help me. BTW, I’d like to get to know with you in the future. Can we share the telegram id or skype id or Whatsapp.. things like that. If you’d like, I will share my LinkedIn profile as well. 🙂
a
Hi, what doesn't work exactly ? (I don't use Telegram nor skype nor WhatsApp, but if you really want to contact me in private, we can stay on Slack but use private messages)
l
I have solved it through kotlinLang community. I thank you for your all advise so far
Have you ever used MUI in Kotlin/JS project?
a
Nope