Javascript CoffeeScript:未在节点imap中定义ImapConnection
我正在尝试从以下位置运行示例咖啡脚本: 发送消息可以正常工作,但当我尝试读取消息时,出现了以下错误:Javascript CoffeeScript:未在节点imap中定义ImapConnection,javascript,node.js,coffeescript,Javascript,Node.js,Coffeescript,我正在尝试从以下位置运行示例咖啡脚本: 发送消息可以正常工作,但当我尝试读取消息时,出现了以下错误: TypeError: imap.ImapConnection is not a function at Object.<anonymous> (/home/rmatuszak/Dokumenty/NodeJS/mail/coffee2/read.coffee:15:14) at Object.<anonymous> (/home/rmatuszak/Dokumen
TypeError: imap.ImapConnection is not a function
at Object.<anonymous> (/home/rmatuszak/Dokumenty/NodeJS/mail/coffee2/read.coffee:15:14)
at Object.<anonymous> (/home/rmatuszak/Dokumenty/NodeJS/mail/coffee2/read.coffee:7:1)
at Module._compile (module.js:409:26)
at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:134:23)
at compileScript (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
at compilePath (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
at Object.<anonymous> (/usr/lib/node_modules/coffee-script/bin/coffee:7:41)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
TypeError:imap.ImapConnection不是函数
反对。(/home/rmatuszak/Dokumenty/NodeJS/mail/coffee2/read.coffee:15:14)
反对。(/home/rmatuszak/Dokumenty/NodeJS/mail/coffee2/read.coffee:7:1)
在模块处编译(Module.js:409:26)
在Object.exports.run(/usr/lib/node_modules/coffee script/lib/coffee script/coffee script.js:134:23)
在compileScript(/usr/lib/node_modules/coffee script/lib/coffee script/command.js:224:29)
在compilePath(/usr/lib/node_modules/coffee script/lib/coffee script/command.js:174:14)
在Object.exports.run(/usr/lib/node_modules/coffee script/lib/coffee script/command.js:98:20)
反对。(/usr/lib/node_modules/coffee script/bin/coffee:7:41)
在模块处编译(Module.js:409:26)
在Object.Module.\u extensions..js(Module.js:416:10)
在Module.load(Module.js:343:32)
在Function.Module.\u加载(Module.js:300:12)
位于Function.Module.runMain(Module.js:441:10)
启动时(node.js:139:18)
在node.js:968:3
在这篇文章的主页上,有人提到了这个问题,但没有得到答案。有人有这样的问题吗?我明白了;)根据,我意识到,我必须使用
server=new-imap
创建一个新的imap对象,正如脚本中声明的那样。我得到了它;)据我了解,,我必须使用脚本中声明的server=new imap
创建一个新的imap对象。请将您的解决方案发布到原始问题,并询问有关超时问题的新问题。请将您的解决方案发布到原始问题,并询问有关超时问题的新问题