Hexo: Got 'ERROR Local hexo not found in' message when type hexo g

Created on 20 Jan 2018  ·  1Comment  ·  Source: hexojs/hexo

Environment Info

Node version(node -v): v0.10.48

Your site _config.yml (Optional): default

Your theme _config.yml (Optional): default

Hexo and Plugin version(npm ls --depth 0):

hexo-cli: 1.0.4
os: Linux 4.10.4-1.el6.elrepo.i686 linux ia32
http_parser: 1.2
node: 0.10.48
v8: 3.14.5.11
ares: 1.9.0-DEV
uv: 0.10.34
zlib: 1.2.3
modules: 11
openssl: 1.0.1e-fips

For BUG

i had been following guide to installed node and hexo, then got this issue:
[root@host hexo]# hexo init blog
[root@host hexo]# cd blog/
[root@host blog]# npm install
[root@host blog]# hexo g
/root/Dropbox/hexo/blog/node_modules/hexo/lib/models/post_asset.js:5
const _ = require('lodash');
^^^^^
ERROR Local hexo not found in ~/Dropbox/hexo/blog
ERROR Try running: 'npm install hexo --save'

For question

how to resolve this issue?

For feature request

Most helpful comment

Well, this issue is due to the version of Nodejs and centos.

  1. The default version of Nodejs installed by yum command is v0.10.48, this version just support 7% of ES6
  2. 32bit CentOS 6 don't support nodejs 6.x
  3. Change CentOS 6 to 64bit
  4. Install nodejs 6.x
    curl -sL https://rpm.nodesource.com/setup_6.x | bash -
    yum install -y nodejs

I changed Centos to 64Bit and installed Node6.X then install the hexo and it running well.

>All comments

Well, this issue is due to the version of Nodejs and centos.

  1. The default version of Nodejs installed by yum command is v0.10.48, this version just support 7% of ES6
  2. 32bit CentOS 6 don't support nodejs 6.x
  3. Change CentOS 6 to 64bit
  4. Install nodejs 6.x
    curl -sL https://rpm.nodesource.com/setup_6.x | bash -
    yum install -y nodejs

I changed Centos to 64Bit and installed Node6.X then install the hexo and it running well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bearpaw picture bearpaw  ·  3Comments

lushijie picture lushijie  ·  3Comments

demurgos picture demurgos  ·  3Comments

ghost picture ghost  ·  3Comments

cxgreat2014 picture cxgreat2014  ·  3Comments