为什么我把cnode代码clone到本地 调试模式启动报告错误
发布于 8 年前 作者 jadeball 3471 次浏览 来自 问答

为什么我把cnode代码clone到本地 调试模式启动报告错误 非debuger模式启动 没问题。环境node.js 4.4版本下。

/usr/local/bin/node --debug-brk=65298 --nolazy app.js Debugger listening on port 65298 /work/Bitbucket/antdream/nodeclub/node_modules/log4js/lib/appenders/console.js:3 , consoleLog = console.log.bind(console); ^

TypeError: Cannot read property ‘bind’ of undefined at Object.<anonymous> (/work/Bitbucket/antdream/nodeclub/node_modules/log4js/lib/appenders/console.js:3:27) 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 Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/work/Bitbucket/antdream/nodeclub/node_modules/log4js/lib/log4js.js:67:1) 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 Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/work/Bitbucket/antdream/nodeclub/common/logger.js:6:14) 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 Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/work/Bitbucket/antdream/nodeclub/middlewares/mongoose_log.js:2:16) 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 Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/work/Bitbucket/antdream/nodeclub/app.js:22:1) 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 [object Object].Module.runMain [as _onTimeout] (module.js:441:10) at Timer.listOnTimeout (timers.js:92:15)

6 回复

有人碰到过同样问题吗?

缺少依赖模块?

@cctv1005s 代码colone下拉 就make install过,正常启动没问题,调试debugger则报告log4js的错误,网上搜索也找不到问题原因

为什么啊

终于找到原因了。我用命令行node --debug 没问题。问题出在2014版的webstorm上。我换了2016版的webstorm则 没问题了。

回到顶部