codefine / hexo-theme-mellow

based on material design
https://hexo.lujingtao.com
The Unlicense
162 stars 32 forks source link

执行hexo s,报错:ERROR Asset render failed: css/style.css #35

Closed YeWills closed 5 years ago

YeWills commented 5 years ago

执行 hexo s 报错信息如下: $ hexo s INFO Start processing INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop. WARN Partial _third-party/swipebox does not exist. (in _partial\script.ejs) ERROR Asset render failed: css/style.css TypeError: Cannot read property 'eval' of null at C:\Users\Administrator\Desktop\git\blog\node_modules\less\lib\less\tree\call.js:41:54

然后导致页面css无法加载 已经按照wiki指导(https://blog.lujingtao.com/2017/11/20/hexo-theme/)安装依赖,但还是css无法加载。 我的github博客地址https://mryewills.github.io/ 求大神支招

codefine commented 5 years ago

@MrYeWills

这可能是我上次更新版本留下的一个bug。你现在尝试修改源码:

位置:hexo-theme-mellow/layout/_partial/script.ejs,移除第13行<%- partial("_third-party/swipebox") %>;

如果还报错,再反馈一下报错信息。

YeWills commented 5 years ago

作者解决问题超快,删除上面代码,然后重新安装下面这个依赖,完美解决问题 yarn add hexo-renderer-less@0.2.0

xiaohuang888 commented 5 years ago

第13行是,然后yarn add hexo-renderer-less@0.2.0不能安装,我的指令是npm yarn add hexo-renderer-less@0.2.0,hexo clean,hexo deploy后还是怎么办