我已将节点升级到v0.8.0,之前为v0.6.9。我已将模块升级到最新版本。
但是当我启动服务器时,我反复收到如下错误:
未捕获的异常:\“sys \”模块现在称为\“util \”。,stack: 错误:\“sys \”模块现在称为\“util \”。\ n at sys.js:1:69 \ n在NativeModule.compile(node.js:602:5)\ n at Function.NativeModule.require(node.js:570:18)\ n at Module.require中的Function.Module._load(module.js:297:25)\ n (module.js:362:17)\ n at require(module.js:378:17)\ n at 宾语。 (/home/user1/pollroll/code/web/node_modules/oauth-server/lib/util.js:23:7)\n 在Module._compile(module.js:449:26)\ n at 在Module.load上的Object.Module._extensions..js(module.js:467:10)\ n (module.js:356:32)“}
你能建议一个解决方案吗?
答案 0 :(得分:1)
模块oauth-server已于一年前更新。还没准备好node.js 0.8。您可以通过将sys = require('sys')
的第23行中的sys = require('util')
更改为/home/user1/pollroll/code/web/node_modules/oauth-server/lib/util.js
来手动解决此问题。