我一直在关注这个https://github.com/songz/OpenTokNodeJS项目。
我已经提交了一个问题,但我想在这里尝试一下。
我一直在努力让它运行起来,但似乎无法成功。 这是我的错误信息。
但我还是遇到了同样的错误。有什么想法吗?
感谢您制作这个,看起来很棒,迫不及待想让它运行起来!
我已经提交了一个问题,但我想在这里尝试一下。
我一直在努力让它运行起来,但似乎无法成功。 这是我的错误信息。
TypeError: Object Error: Invalid Key or Secret has no method 'createSession'
at port (/Users/rswain/Desktop/Art/videotok/app.js:42:19)
at callbacks (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:164:37)
at param (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:138:11)
at param (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:135:11)
at pass (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:173:5)
at Object.router (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:33:10)
at next (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at resume (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/middleware/static.js:65:7)
at SendStream.error (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/middleware/static.js:80:37)
TypeError: Object Error: Invalid Key or Secret has no method 'createSession'
at port (/Users/rswain/Desktop/Art/videotok/app.js:42:19)
at callbacks (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:164:37)
at param (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:138:11)
at param (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:135:11)
at pass (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:173:5)
at Object.router (/Users/rswain/Desktop/Art/videotok/node_modules/express/lib/router/index.js:33:10)
at next (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at resume (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/middleware/static.js:65:7)
at SendStream.error (/Users/rswain/Desktop/Art/videotok/node_modules/express/node_modules/connect/lib/middleware/static.js:80:37)
我猜可能与我的API密钥有关,而且说实话,我甚至不确定应该把它放在哪里。我尝试了几种方法。首先,我替换了app.js中的行:
var OTKEY = process.env.TB_KEY; var OTSECRET = process.env.TB_SECRET;
使用以下内容:
var OTKEY = (my api key);
var OTSECRET = (my secret);
但是当我运行$ node app.js时,什么也没有发生,我遇到了错误
我还尝试将key和secret添加到package.json文件中,如下所示
{
"name":"NodeOpenTok",
"version":"0.0.2",
"dependencies":{
"opentok":"44456952",
"express":"7f2ecae114cd4095a1ed689ff63910f1ea79444b",
"ejs":""
}
}
但我还是遇到了同样的错误。有什么想法吗?
感谢您制作这个,看起来很棒,迫不及待想让它运行起来!