Require.js - "模块名称...尚未加载上下文:"

时间:2018-04-28 03:53:01

标签: javascript requirejs

所以我 非常 对require.js来说是新手,我很困惑。有人能告诉我为什么我收到消息"模块名称" kahoot.js"尚未加载上下文"当我在脚本的顶部需要它时?

    <script>
        require(['config'],function() {
            require(['script']);
            var Kahoot = require("kahoot.js");
            var client = new Kahoot;
            console.log("Joining kahoot...");
            client.join(gamePin,"kahoot.js");
            client.on("joined", () => {
                console.log("I joined the Kahoot!");
            });
            client.on("quizStart", quiz => {
                console.log("The quiz has started! The quiz's name is:", quiz.name);
            });
            client.on("questionStart", question => {
                console.log("A new question has started, answering the first answer.");
                question.answer(0);
            });
            client.on("quizEnd", () => {
                console.log("The quiz has ended.");
            });
        });
    </script>

0 个答案:

没有答案