[hexojs/hexo]server 没有这个命令啊

2024-07-23 301 views
8

king@king-ubuntu:~/git/HexoBlog$ hexo s Usage: hexo

Commands: clean Removed generated files and cache. config Get or set configurations. deploy Deploy your website. generate Generate static files. help Get help on a command. init Create a new Hexo folder. list List the information of the site migrate Migrate your site from other system to Hexo. new Create a new post. publish Moves a draft post from _drafts to _posts folder. render Render files with renderer plugins. 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 是我产生幻觉了吗

回答

4

npm install hexo-server

8

多谢 已经解决 但是运行有问题 只能看到一句话 Cannot GET /

6

我也遇到这个问题,正在找方法

2

看来是个坑 hexo init npm install hexo g hexo s 这样好像就可以

6

多谢 解决问题,看了好多教程没有说在初始化后要npm install的

6

我启动hexo server后访问localhost:4000也出现了 cannot get这个问题,到底怎么回事儿啊,有人知道么?

6

hexo init npm install hexo g hexo s 我按这个步骤执行是可以的,其他情况就不情况了。我一开始就少了npm install,出现了一样的情况。

9

@astraylinux 按你写的解决了 谢谢!