Closed mlordelo closed 1 year ago
Hi @mlordelo. I'm sorry I missed this post. I'd still like to help if I can. Were you ever able to work your issue out?
Hi @frankieali. No problem. No, I wasn't. I had to stop working on the bot due to other priorities, but I would like to create an overlay and integrate dice-box into the bot.
I'll be working on this bot again this week.
I am new on node/javascript development and I've tried what I found about the error (adding the type = module in the package.json) but I couldn't solve the issue.
Thanks in advance!
I'd be curious how you've set up your dev environment. Are you running your code through a bundler at all? I've been bootstrapping my apps with Vite lately. Now that I think about it, I recall having issues running dice-box.es.js
as an es6 module. Perhaps due to the web workers it's bundled with.
I would say try setting up your project with Vite and I'll see if there's something I can do about es6 modules in the meantime.
I created a basic node app, installed the dice box, and imported it (just a simple app to try to use it).
My goal is to install dice box in another app which is a twitch bot with commands to roll dices and to take cards from critical success/fail decks (there is an overlay to show the card in live).
I will try to use Vite. Thanks for the help, @frankieali!!
Hey @mlordelo I did find an issue in the code that causes it to break in strict mode. That been fixed. It took me a few attempts to get the build right. The latest is @3d-dice/dice-box@1.0.8
I set up a new demo that shows how to use the library without having to install anything dice-box from CDN
Hopefully the code fix or that new demo will help you get over the hump.
Hi @frankieali,
First, thanks for all your help!!
I managed to do what I was trying to, using that static template + socket.io to create the overlay for OBS, integrated into a Twitch chatbot with the command to roll the dices!
Hello! First, I would like to thank you for this module, it is awesome!
I am creating a Twitch bot for D&D campaigns and I would like to use the module to create an overlay displaying the dice roll when the chat type a command.
I installed the module and I am trying to import it into my node app, but I am getting some errors like:
I tried to add the "type": "module" in the package.json but it is not working. Sorry if this is not the best place to ask it, but could you please give me some help to import and use the module in my node app?
Thanks in advance!
PS: Sorry about my English, this is not my first language lol