Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

刚换了Ubuntu12.10 hexo出现这种情况,不知道为什么 #61

Closed
rose1988c opened this issue Jan 15, 2013 · 11 comments
Closed

刚换了Ubuntu12.10 hexo出现这种情况,不知道为什么 #61

rose1988c opened this issue Jan 15, 2013 · 11 comments

Comments

@rose1988c
Copy link

vanilla@ubuntu:~$ hexo -v

/usr/local/lib/node_modules/hexo/lib/cache.js:13
if (err) throw new Error('Failed to read file: ' + cachePath);
^
Error: Failed to read file: /home/vanilla/.cache
at /usr/local/lib/node_modules/hexo/lib/cache.js:13:24
at /usr/local/lib/node_modules/hexo/lib/util/file.js:104:25
at [object Object]. (fs.js:98:14)
at [object Object].emit (events.js:64:17)
at fs.js:1190:12
at Object.oncomplete (/usr/local/lib/node_modules/hexo/node_modules/graceful-fs/graceful-fs.js:90:5)

@rose1988c
Copy link
Author

刚浏览了下,和问题#56一样,试着删除。cache

然后出现

undefined:7
"
^
SyntaxError: Unexpected token

at Object.parse (native)
at /usr/local/lib/node_modules/hexo/lib/config.js:34:24
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:190:13
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:94:25
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:187:17
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:459:34
at /usr/local/lib/node_modules/hexo/lib/util/file.js:105:9
at [object Object].<anonymous> (fs.js:123:5)
at [object Object].emit (events.js:64:17)
at fs.js:1190:12

@rose1988c
Copy link
Author

config.js 34:24
var version = JSON.parse(result[0]).version,

result is undefined..

@tommy351
Copy link
Member

在ubuntu上的確會產生這種情況
正在修復中

@tommy351
Copy link
Member

0.5.3更新,不知道能不能修復此情況,請測試看看

@rose1988c
Copy link
Author

恩。晚上我回去测试,再反馈

@rose1988c
Copy link
Author

/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo/bin/hexo
hexo@0.5.3 /usr/local/lib/node_modules/hexo
├── graceful-fs@1.1.14
├── colors@0.6.0-1
├── marked@0.2.7
├── async@0.1.22
├── mime@1.2.8
├── swig@0.13.4
├── ejs@0.8.3
├── nib@0.9.1
├── highlight.js@7.3.0
├── underscore@1.4.3
├── moment@1.7.2
├── optimist@0.3.5 (wordwrap@0.0.2)
├── stylus@0.32.0 (debug@0.7.0 cssom@0.2.5 mkdirp@0.3.4)
├── fs-watch-tree@0.2.2 (when@1.3.0)
├── connect@2.7.2 (fresh@0.1.0 cookie-signature@0.0.1 pause@0.0.1 bytes@0.1.0 cookie@0.0.5 buffer-crc32@0.1.1 debug@0.7.0 formidable@1.0.11 qs@0.5.1 send@0.1.0)
└── yamljs@0.1.4
vanilla@ubuntu:~$ hexo -v

undefined:7
"
^
SyntaxError: Unexpected token

at Object.parse (native)
at /usr/local/lib/node_modules/hexo/lib/config.js:34:24
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:190:13
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:94:25
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:187:17
at /usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:459:34
at /usr/local/lib/node_modules/hexo/lib/cache.js:16:11
at /usr/local/lib/node_modules/hexo/lib/util/file.js:104:25
at [object Object].<anonymous> (fs.js:98:14)
at [object Object].emit (events.js:64:17)

还是不行哦。

@tommy351
Copy link
Member

如果只是單純的執行hexo呢?-v在0.5.0後已經被拿掉了

@rose1988c
Copy link
Author

hexo 也是一样报错

@rose1988c
Copy link
Author

打印 /usr/local/lib/node_modules/hexo/lib/config.js
34行的 result 最后2项是undefined。

e\ne\ne\n1\n"\n\n\n \n \n}\n,\n\n\n \n \n"\n_\nf\nr\no\nm\n"\n:\n \n"\nh\ne\nx\no\n"\n\n\n}\n\n\n',
undefined,
undefined ]

@tommy351
Copy link
Member

那是正常的,未初始化情況下讀不到cache和config

@rose1988c
Copy link
Author

OK.

我在 http://nodejs.org/
下载node-v0.8.17.tar.gz
解压/
./configure
make
make install
安装了次。and ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants