TypeError: value is out of bounds
來源:程序員人生 發布時間:2016-07-01 08:41:16 閱讀次數:2873次
1、毛病描寫
> buffer.writeUInt8(256,3);
TypeError: value is out of bounds
at checkInt (buffer.js:825:11)
at Buffer.writeUInt8 (buffer.js:873:5)
at repl:1:8
at REPLServer.defaultEval (repl.js:262:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
>
2、毛病緣由 這個value參數值超過指定類型的數值允許范圍
3、解決辦法
> buffer.writeUInt8(255,3);
4
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈