happypeter / haoduoshipin

好多视频
http://haoduoshipin.com
236 stars 88 forks source link

500 #428

Closed happypeter closed 6 years ago

happypeter commented 7 years ago

后台报错:

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
at fromObject (buffer.js:275:9)
    at Function.Buffer.from (buffer.js:107:10)
    at new Buffer (buffer.js:86:17)
    at Function._callee$ (/home/peter/sites/haoduoshipin/client/.next/dist/pages
/index.js:70:25)
    at tryCatch (/home/peter/sites/haoduoshipin/client/node_modules/regenerator-
runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/home/peter/sites/haoduoshipin/client/node
_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as next] (/home/peter/sites/hao
duoshipin/client/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/home/peter/sites/haoduoshipin/client/node_modules/babel-runtime/he
lpers/asyncToGenerator.js:17:30)
    at /home/peter/sites/haoduoshipin/client/node_modules/babel-runtime/helpers/
asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:109:7)
happypeter commented 7 years ago

不是总能复现,时好时坏。

我怀疑是读取 Json 文件的时候有的时候读取失败造成的。

https://github.com/happypeter/haoduoshipin/blob/master/client/pages/index.js#L79

happypeter commented 6 years ago

好了。