尽管我已经导入了包含我将使用的函数的 JS 文件,但 Node.JS 说它是未定义的。
require('./game_core.js');
Users/dasdasd/Developer/optionalassignment/games.js:28
thegame.gamecore = new game_core( thegame );
^
ReferenceError: game_core is not defined
你知道有什么问题吗?Game_core 包含以下功能:
var game_core = function(game_instance){....};