Node.js 在VPS中运行节点应用程序会出现错误,但在工作笔记本中不存在错误
在DigitalOcean Ubuntu17.04 x64 VPS服务器上运行Node.js 在VPS中运行节点应用程序会出现错误,但在工作笔记本中不存在错误,node.js,digital-ocean,vps,Node.js,Digital Ocean,Vps,在DigitalOcean Ubuntu17.04 x64 VPS服务器上运行节点应用程序时,出现以下错误: /root/myApp/node_modules/natural/lib/natural/brill_pos_tagger/lib/Brill_POS_Tagger.js:26 logger.setLevel('WARN'); ^ TypeError: logger.setLevel is not a function at Object.<anonymou
节点应用程序时,出现以下错误:
/root/myApp/node_modules/natural/lib/natural/brill_pos_tagger/lib/Brill_POS_Tagger.js:26
logger.setLevel('WARN');
^
TypeError: logger.setLevel is not a function
at Object.<anonymous> (/root/myApp/node_modules/natural/lib/natural/brill_pos_tagger/lib/Brill_POS_Tagger.js:26:8)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/root/myApp/node_modules/natural/lib/natural/index.js:81:26)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
/root/myApp/node\u modules/natural/lib/natural/brill\u pos\u tagger/lib/brill\u pos\u tagger.js:26
logger.setLevel('WARN');
^
TypeError:logger.setLevel不是函数
反对。(/root/myApp/node_modules/natural/lib/natural/brill_pos_tagger/lib/brill_pos_tagger.js:26:8)
在模块处编译(Module.js:570:32)
在Object.Module.\u extensions..js(Module.js:579:10)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)
at Module.require(Module.js:497:17)
根据需要(内部/module.js:20:19)
反对。(/root/myApp/node_modules/natural/lib/natural/index.js:81:26)
在模块处编译(Module.js:570:32)
在Object.Module.\u extensions..js(Module.js:579:10)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)
at Module.require(Module.js:497:17)
根据需要(内部/module.js:20:19)
然而,当我在我的工作笔记本电脑上用相同的东西运行node应用程序时,它会正常运行
起初我认为谷歌云API的安装可能会出错,然而,在我的VPS上安装了它之后,我仍然会遇到同样的错误
是否还有其他可能导致此错误的原因?我使用笔记本电脑上的相同代码运行节点应用程序
,运行正常