Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

在使用最新版 NexT 时,hexo -g 编译出错,“replace”未定义 #62

Open
LuckyGlass opened this issue Feb 11, 2020 · 1 comment

Comments

@LuckyGlass
Copy link

报错如下:

TypeError: Cannot read property 'replace' of undefined
at Object. (E:\HEXOBLOG\node_modules\hexo-asset-image\index.js:31:38)
at initialize.exports.each (E:\HEXOBLOG\node_modules\hexo-asset-image\node_modules\cheerio\lib\api\traversing.js:293:24)
at Hexo. (E:\HEXOBLOG\node_modules\hexo-asset-image\index.js:29:16)

请问这是什么原因?
我使用旧版的 NexT(4.0.0) 就可以编译通过。

@KaiJiaBrother
Copy link

我用最新版的没问题,第24行代码改为var endPos = link.lastIndexOf ('/');即可。你的编译报错之后有日志文件,里面有具体信息,可能是你改了别的东西了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants