0

When I installed Hexo, I got this error. I don't know what's happend? Can someone help me?

C:\Users\LiuHu>npm install hexo-cli -g
npm WARN optional dep failed, continuing fsevents@0.3.5
C:\Users\LiuHu\AppData\Roaming\npm\hexo -> C:\Users\LiuHu\AppData\Roaming\npm\no
de_modules\hexo-cli\bin\hexo
hexo-cli@0.1.4 C:\Users\LiuHu\AppData\Roaming\npm\node_modules\hexo-cli
├── abbrev@1.0.5
├── minimist@1.1.1
├── bluebird@2.9.13
├── tildify@1.0.0 (user-home@1.1.1)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-colo
r@1.3.0, strip-ansi@2.0.1, has-ansi@1.0.3)
└── hexo-fs@0.1.3 (escape-string-regexp@1.0.3, graceful-fs@3.0.5, chokidar@0.
12.6)

When i run this command npm install . it show me this error : D:\Document\Z_MYBlog_New>npm install

npm ERR! install Couldn't read dependencies

npm ERR! Windows_NT 6.1.7601

npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs

\\node_modules\\npm\\bin\\npm-cli.js" "install"

npm ERR! node v0.12.0

npm ERR! npm v2.5.1

npm ERR! path D:\Document\Z_MYBlog_New\package.json

npm ERR! code ENOPACKAGEJSON

npm ERR! errno -4058

npm ERR! package.json ENOENT, open 'D:\Document\Z_MYBlog_New\package.json'

npm ERR! package.json This is most likely not a problem with npm itself.

npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:

npm ERR! D:\Document\Z_MYBlog_New\npm-debug.log

And in D:\Document\Z_MYBlog_New\npm-debug.log this log file, it show me : 0 info it worked if it ends with ok

1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',

1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',

1 verbose cli 'install' ]

2 info using npm@2.5.1

3 info using node@v0.12.0

4 verbose node symlink C:\Program Files\nodejs\\node.exe

5 error install Couldn't read dependencies

6 verbose stack Error: ENOENT, open 'D:\Document\Z_MYBlog_New\package.json'

6 verbose stack at Error (native)

7 verbose cwd D:\Document\Z_MYBlog_New

8 error Windows_NT 6.1.7601

9 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"

10 error node v0.12.0

11 error npm v2.5.1

12 error path D:\Document\Z_MYBlog_New\package.json

13 error code ENOPACKAGEJSON

14 error errno -4058

15 error package.json ENOENT, open 'D:\Document\Z_MYBlog_New\package.json'

15 error package.json This is most likely not a problem with npm itself.

15 error package.json npm can't find a package.json file in your current directory.

16 verbose exit [ -4058, true ]

liuhu
  • 3
  • 4

1 Answers1

3

This is a warn not error

I suggest you use the hexo 2.8.Now don't use hexo 3.0. cause the hexo-server or hexo clean maybe has something wrong that will make you bad. npm install hexo@2.8 -g

Community
  • 1
  • 1
B.Y.JFF
  • 66
  • 3
  • Thanks for your suggestion. I try to install hexo 2.8 . and then input command `hexo version`, it also show me `hexo command not fund` . and i try to add hexo path `C:\Users\LiuHu\AppData\Roaming\npm` into my system path. it is working. – liuhu Mar 12 '15 at 15:07
  • I install hexo 2.8.and then input command `hexo version`, it show me `hexo command not fund` . i try to add hexo path `C:\Users\LiuHu\AppData\Roaming\npm` into my system path. it is working. `D:\Document\Z_MYBlog_New>hexo version ` `hexo: 2.8.3 ` `os: Windows_NT 6.1.7601 win32 x64 ` `http_parser: 2.3` `node: 0.12.0` `v8: 3.28.73 ` `uv: 1.0.2 ` `zlib: 1.2.8` `modules: 14 ` `openssl: 1.0.1l` But when i input command : `D:\Document\Z_MYBlog_New>hexo init liuhu` `[info] Copying data` `[info] You are almost done! Don't forget to run `npm install` before you start b` – liuhu Mar 12 '15 at 15:18
  • Just do `npm install`,it will be ok. – B.Y.JFF Mar 12 '15 at 16:10
  • follow it `$ hexo init $ cd $ npm install` – B.Y.JFF Mar 13 '15 at 02:04