LOFTER2Hexo
LOFTER2Hexo copied to clipboard
throw er; // Unhandled 'error' event
E:\LOFTER>readxml
events.js:182
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property '0' of null
at C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bin\readxml.js:14
4:82
at Array.forEach (<anonymous>)
at _parseContent (C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bi
n\readxml.js:143:26)
at parsearticle (C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bin
\readxml.js:204:29)
at C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bin\readxml.js:70
:31
at Array.forEach (<anonymous>)
at Object.parsePost (C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo
\bin\readxml.js:67:23)
at C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bin\readxml.js:40
:17
at C:\Users\i\AppData\Roaming\npm\node_modules\lofter2hexo\bin\readxml.js:62
:21
at Parser.<anonymous> (C:\Users\i\AppData\Roaming\npm\node_modules\lofter2he
xo\node_modules\xml2js\lib\xml2js.js:484:18)
E:\LOFTER>
估计你这个是有除了jpeg和png格式的图片,改一下正则就好 imgURL = imgURL.match(/http..jpg|http..jpeg|http..gif|http..png/)[0] 我的是有gif所以改成了上面的