I received this error and this is my code, how solve it ?
import { world, system } from "@minecraft/server";
import {
ActionFormData,
MessageFormData,
ModalFormData
} from "@minecraft/server-ui";
const form = new ActionFormData()
.button("salut")
.button("salut2")
.body("sasa")
world.beforeEvents.itemUse.subscribe(async (eventData) => {
const player = eventData.source;
const itemUsed = eventData.itemStack;
if (itemUsed.typeId == "minecraft:compass") {
await form.show(player);
}
});