You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to integrate dice box with Ruby on Rails 7 so I pinned @3d-dice/dice-box using importmap bin/importmap pin @3d-dice/dice-box and moved the assets folders to public/dice-box/.
Using Stimulus I initialised dice box like this:
import{Controller}from"@hotwired/stimulus";importDiceBoxfrom"@3d-dice/dice-box";// Connects to data-controller="norisknofun"exportdefaultclassextendsController{asyncconnect(){this.diceBox=newDiceBox("#dice",{assetPath: "/dice-box/"});awaitthis.diceBox.init();// this.diceBox.roll("2d6");}}
The new DiceBox expression works and it creates the canvas as expected in div#dice. However await this.diceBox.init() throws the following error: Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://domain.com/_/jbCGoMdf.js.
Now I'm at a loss of what to do as I couldn't find a file with that name anywhere. Neither in node_modules nor anywhere else in the project.
The text was updated successfully, but these errors were encountered:
I want to integrate dice box with Ruby on Rails 7 so I pinned @3d-dice/dice-box using importmap
bin/importmap pin @3d-dice/dice-box
and moved the assets folders topublic/dice-box/
.Using Stimulus I initialised dice box like this:
The
new DiceBox
expression works and it creates the canvas as expected indiv#dice
. Howeverawait this.diceBox.init()
throws the following error:Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://domain.com/_/jbCGoMdf.js
.Now I'm at a loss of what to do as I couldn't find a file with that name anywhere. Neither in node_modules nor anywhere else in the project.
The text was updated successfully, but these errors were encountered: