hexo命令不能執(zhí)行,返回報(bào)usage
記錄一次自懟過程
背景
嘗試發(fā)文使用hexo,但是在此輸入命令,都返回usage
第一天20180903
嘗試了所有的命令
hexo clean
生成靜態(tài)頁面
hexo g
本地服務(wù)器預(yù)覽
hexo s
發(fā)布到git
hexo d
生成新文章#在source/_post文件夾里面,編輯生成的markdown文件
hexo new 'post-name'
都返回同樣的結(jié)果
? ~ cd blog
? blog hexo g
Usage: hexo
Commands:
help Get help on a command.
init Create a new Hexo folder.
version Display version information.
Global Options:
--config Specify config file instead of using _config.yml
--cwd Specify the CWD
--debug Display all verbose messages in the terminal
--draft Display draft posts
--safe Disable all plugins and scripts
--silent Hide output on console
For more help, you can use 'hexo help [command]' for the detailed information
or you can check the docs: http://hexo.io/docs/
解決方案:繼續(xù)搜索
- 搜索關(guān)鍵詞: hexo命令不能執(zhí)行,返回usage(Google)
- 沒有找到可行建議,修改搜索關(guān)鍵詞:hexo 命令usage(google )
找到一個(gè)文檔Hexo常見問題解決方案里面描述最接近的應(yīng)該是這個(gè)情況
Hexo命令失效
問題描述:
輸入命令后出現(xiàn)如下信息:
Usage: hexo
Commands:
help Get help on a command
init Create a new Hexo folder
migrate Migrate your site from other system to Hexo
version Display version information
Global Options:
--debug Display all verbose messages in the terminal
--safe Disable all plugins and scripts
For more help, you can use hexo help [command] for the detailed information
or you can check the docs: http://zespia.tw/hexo/docs/
解決方案:
檢查_config.yml中的內(nèi)容,特別注意:后面需要有一個(gè)空格。
檢查`package.json’中的內(nèi)容,注意添加hexo信息用來標(biāo)識這是一個(gè)hexo目錄:
"hexo": { "version": "" } }
如果還是有問題,可以更新hexo之后,在新的文件夾中重新進(jìn)行hexo init。
第二天20180904
試了重新升級hexo。升級后,沒有解決。
我沒有嘗試重新init,因?yàn)椴淮_定已有的文件會(huì)受到怎么樣的影響。
試了npm安裝,失敗
繼續(xù)搜索 關(guān)鍵詞:hexo 發(fā)布文章
找到發(fā)布姿勢,但是回到了最開始的問題,執(zhí)行所有的問題都返回usage
GitHub搜索hexo的repo
進(jìn)入了一個(gè)關(guān)注人最多的hexo.issue中再次搜索 hexo/usage.最接近的是這個(gè)hexo g可以正常使用,但是其他例如hexo s就無法使用
無解,至此有點(diǎn)崩,決定換種方式再試試。
第三天20180906
在hexo的博客上向成功的博主提問
注冊了Disqus賬號(又點(diǎn)亮了一個(gè)技能),提問博主,沒有解決
加入Google Group 的Hexo主題提問
提問無人回復(fù)
找當(dāng)初幫忙搭建博客的淘寶店主請教
他竟然微信把我刪除了
淘寶阿里旺旺留言,一時(shí)之間沒有回復(fù),回復(fù)的時(shí)候問題已經(jīng)解決
懟圈發(fā)issue提問
終于得到了解決~
非常感謝NBR的解答
@Irene6161
你在~根目錄運(yùn)行 hexo g... 當(dāng)然沒反應(yīng)... 相當(dāng)于你走在大街上,大吼一聲: 老婆,飯煮好了沒? 你老婆在家是聽不見的...
淘寶... 好歹是解決了... 用錢解決也是誠意... 但每天都用的東西最好還是自己了解一下
網(wǎng)上搜了好多也沒有找到合適的方案。
詳細(xì)一些就是自懟搜索姿勢的機(jī)會(huì)吶
看完這段回復(fù),就cd blog操作了一下,還是不成功。
然后起來去接杯水,回來坐到座位上,恍然大悟,想起來之前自己在桌面上創(chuàng)建了一個(gè)blog的文件夾,是空的,然后移到了macbook中,而之前的那個(gè)blog文件,大概在2月份被我移到了iCloud,因此才會(huì)有這個(gè)“大喊老婆她聽不見”的情況。
至此,困擾了三天的問題得到了解決,并且在@NBR的提醒下記錄自懟,感謝懟圈,感謝懟友
TL
20180906 30min init