我使用的是运行OS Yosemite10.10.3版的heroku,我正在用TextMate 2.0版-Beta.7.4编写代码,所有的heroku和hubot都是最新版本。
在一个班级中,我们必须在我们的计算机上安装Hubot,以便在终端中对代码进行本地测试。一旦代码正常,我们就把它推给Heroku,并用另一个机器人测试它。然后,如果这个机器人没问题,老师会推到git,我们就可以使用Hubot来展示我们做的代码。
我的问题是我写的代码在我的终端中没有被hubot看到。我可以做些什么来解决这个问题,这样我就可以继续下一步了?我所做的一切就是编写代码,但它从来没有出现在终端中的hubot面前。
当我尝试推送到Heroku之前,我得到了这个错误。
2015-06-26T16:56:00.521845+00:00 app[web.1]: [Fri Jun 26 2015 12:56:00 GMT-0400 (EDT)] ERROR Unable to load /app/scripts/thisclass: /app/scripts/thisclass.js:1我对这些文件的代码是以JavaScript结尾的,所以.js
这是thisclass.js
// Description:
// Explaining the class, program, and school.
//
// Dependencies:
// None
//
// Configuration:
// None
//
// Commands:
// hubot dwp class - Explaining the class, program, and school.
//
// Author:
// Emily Van Vlerah
//
// Contributor:
// None
module.exports = function(robot){
// User types in command
return robot.respond(/dwp class/i,function(msg){
//The class information
msg.send("This is the Deployment of Web Applications for the Web Design and Development program at Full Sail University.");
});
}除了要显示信息外,我的另一个文件也是相同的。
发布于 2015-09-30 22:59:54
在您粘贴的代码中,末尾缺少一个;
https://stackoverflow.com/questions/31079648
复制相似问题