rockswang / qqcensorbot

QQ群反垃圾机器人,基于IOTQQ和百度文本审核API
MIT License
9 stars 1 forks source link

运行报错 #2

Closed laikee99 closed 4 years ago

laikee99 commented 4 years ago

npm start后出现如下内容,npm install 的时候提示audit fix

qqcensorbot@1.0.0 start /qqcensorbot-master node index.js | node_modules.bin\bunyan

sh: node_modules.binbunyan: command not found events.js:287 throw er; // Unhandled 'error' event ^

Error: write EPIPE at afterWriteDispatched (internal/stream_base_commons.js:154:25) at writeGeneric (internal/stream_base_commons.js:145:3) at Socket._writeGeneric (net.js:784:11) at Socket._write (net.js:796:8) at doWrite (_stream_writable.js:442:12) at writeOrBuffer (_stream_writable.js:426:5) at Socket.Writable.write (_stream_writable.js:317:11) at Logger._emit (/qqcensorbot-master/node_modules/bunyan/lib/bunyan.js:923:22) at Logger.info (/qqcensorbot-master/node_modules/bunyan/lib/bunyan.js:1045:24) at Socket. (/qqcensorbot-master/index.js:83:9) at Socket.Emitter.emit (/qqcensorbot-master/node_modules/component-emitter/index.js:133:20) at Socket.emit (/qqcensorbot-master/node_modules/socket.io-client/lib/socket.js:138:10) at Socket.onconnect (/qqcensorbot-master/node_modules/socket.io-client/lib/socket.js:335:8) at Socket.onpacket (/qqcensorbot-master/node_modules/socket.io-client/lib/socket.js:232:12) at Manager. (/qqcensorbot-master/node_modules/component-bind/index.js:21:15) at Manager.Emitter.emit (/qqcensorbot-master/node_modules/component-emitter/index.js:133:20) at Manager.ondecoded (/qqcensorbot-master/node_modules/socket.io-client/lib/manager.js:345:8) at Decoder. (/qqcensorbot-master/node_modules/component-bind/index.js:21:15) at Decoder.Emitter.emit (/qqcensorbot-master/node_modules/component-emitter/index.js:133:20) at Decoder.add (/qqcensorbot-master/node_modules/socket.io-parser/index.js:251:12) at Manager.ondata (/qqcensorbot-master/node_modules/socket.io-client/lib/manager.js:335:16) at Socket. (/qqcensorbot-master/node_modules/component-bind/index.js:21:15) Emitted 'error' event on Socket instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at onwriteError (_stream_writable.js:457:5) at onwrite (_stream_writable.js:484:5) at internal/streams/destroy.js:50:7 at Socket.dummyDestroy [as _destroy] (internal/bootstrap/switches/is_main_thread.js:97:3) at Socket.destroy (internal/streams/destroy.js:38:8) at afterWriteDispatched (internal/stream_base_commons.js:154:17) at writeGeneric (internal/stream_base_commons.js:145:3) [... lines matching original stack trace ...] at Manager.Emitter.emit (/qqcensorbot-master/node_modules/component-emitter/index.js:133:20) { errno: 'EPIPE', code: 'EPIPE', syscall: 'write' } npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! qqcensorbot@1.0.0 start: node index.js | node_modules\.bin\bunyan npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the qqcensorbot@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-13T12_40_12_894Z-debug.log

laikee99 commented 4 years ago

npm 版本:6.14.4 njs版本:v12.16.2

rockswang commented 4 years ago

好像是bunyan命令没有找到?bunyan是本项目内使用的日志系统,你可以:

  1. 直接全局安装bunyan,cnpm install bunyan -g,然后就可以node index.js | bunyan -L 来查看格式化后的日志了。
  2. 或者也可以不使用全局bunyan来格式化日志,直接node index.js就可以了
laikee99 commented 4 years ago

好像是bunyan命令没有找到?bunyan是本项目内使用的日志系统,你可以:

  1. 直接全局安装bunyan,cnpm install bunyan -g,然后就可以node index.js | bunyan -L 来查看格式化后的日志了。
  2. 或者也可以不使用全局bunyan来格式化日志,直接node index.js就可以了

感谢回复!