Fails to import module jbCGoMdf.js on init
Opened this issue · 0 comments
ShadowCrafter011 commented
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";
import DiceBox from "@3d-dice/dice-box";
// Connects to data-controller="norisknofun"
export default class extends Controller {
async connect() {
this.diceBox = new DiceBox("#dice", { assetPath: "/dice-box/" });
await this.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.