hexo server
我的hexo能成功部署 且大开链接也有效果 只是每次在hexo s 的时候会有瑕疵,有如下错误:
➜ blog hexo s
INFO Start processing
ERROR Process failed: layout/.DS_Store
TypeError: Cannot read property 'compile' of undefined
at View._precompile (/Users/idisfkj/blog/node_modules/hexo/lib/theme/view.js:104:22)
at View (/Users/idisfkj/blog/node_modules/hexo/lib/theme/view.js:13:8)
at new Theme._View.View (/Users/idisfkj/blog/node_modules/hexo/lib/theme/index.js:37:10)
at Theme.setView (/Users/idisfkj/blog/node_modules/hexo/lib/theme/index.js:71:20)
at /Users/idisfkj/blog/node_modules/hexo/lib/theme/processors/view.js:14:14
at tryCatcher (/Users/idisfkj/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:503:31)
at Promise._settlePromise (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:560:18)
at Promise._settlePromise0 (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:605:10)
at Promise._settlePromises (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:684:18)
at Promise._fulfill (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:629:18)
at Promise._resolveCallback (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:515:17)
at Promise._settlePromise (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:560:18)
at Promise._settlePromise0 (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:605:10)
at Promise._settlePromises (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:684:18)
at Promise._fulfill (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:629:18)
at /Users/idisfkj/blog/node_modules/bluebird/js/release/nodeback.js:42:21
at /Users/idisfkj/blog/node_modules/graceful-fs/graceful-fs.js:78:16
at tryToString (fs.js:414:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
ERROR Process failed: layout/_partial/.DS_Store
TypeError: Cannot read property 'compile' of undefined
at View._precompile (/Users/idisfkj/blog/node_modules/hexo/lib/theme/view.js:104:22)
at View (/Users/idisfkj/blog/node_modules/hexo/lib/theme/view.js:13:8)
at new Theme._View.View (/Users/idisfkj/blog/node_modules/hexo/lib/theme/index.js:37:10)
at Theme.setView (/Users/idisfkj/blog/node_modules/hexo/lib/theme/index.js:71:20)
at /Users/idisfkj/blog/node_modules/hexo/lib/theme/processors/view.js:14:14
at tryCatcher (/Users/idisfkj/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:503:31)
at Promise._settlePromise (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:560:18)
at Promise._settlePromise0 (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:605:10)
at Promise._settlePromises (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:684:18)
at Promise._fulfill (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:629:18)
at Promise._resolveCallback (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:515:17)
at Promise._settlePromise (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:560:18)
at Promise._settlePromise0 (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:605:10)
at Promise._settlePromises (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:684:18)
at Promise._fulfill (/Users/idisfkj/blog/node_modules/bluebird/js/release/promise.js:629:18)
at /Users/idisfkj/blog/node_modules/bluebird/js/release/nodeback.js:42:21
at /Users/idisfkj/blog/node_modules/graceful-fs/graceful-fs.js:78:16
at tryToString (fs.js:414:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
虽然能成功 但每次看到这个心里就不爽,(强迫症)
有碰到这种情况的兄弟吗? 如何解决。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
把 .DS_Store 删了试试……
有可能配置文件有问题,但我的遇到的情况跟你这个不大一样。我是hexo s启动之后,会报各种各样的错误,但不影响使用。
你用的主题的js有报错
cd 进到你使用的theme对应的目录,再进到layout/和layout/_partial/下.
分别执行rm .DS_Store
这个报错貌似不会影响到使用,但还是挺恶心的。
目录切到你所用那个主题的主目录的样式文件目录,以我的为例
cd themes/maupassant/layout
ls -al 列出所有信息包裹隐藏文件
rm -fr .DS_Store 删除
再执行 hexo generate就没有报错了