Local hexo not found

826 views Asked by At

I try to install Hexo on my server following the instructions:

[root@VM_150_20_centos ~]# yum install -y nodejs
[root@VM_150_20_centos ~]# npm install -g hexo-cli
[root@VM_150_20_centos ~]# hexo init blog
[root@VM_150_20_centos ~]# cd blog
[root@VM_150_20_centos blog]# npm install
[root@VM_150_20_centos blog]# hexo generate

when I try to generate, there is an error:

[root@VM_150_20_centos blog]# hexo generate

/root/blog/node_modules/hexo/lib/extend/tag.js:184
  body((err, result) => {
                      ^
ERROR Local hexo not found in ~/blog
ERROR Try running: 'npm install hexo --save'

I tried run npm install hexo --save, but it didn't help.

My server is CentOS6.8 64bit

2

There are 2 answers

0
Ivan Nginx On

CentOS6 have old Node version.

Input node -v to see what version installed (~v0.10.x).

Old Node version was dropped from maintain.

And look at requirements under linux for now:

node_js:
  - "6"
  - "node

It's mean at least node version 6 needed.

1
情迷法兰西 On

try following code:

npm install -g hexo-cli