I encountered a difficulty in executing "hexo init".
(已解决)English version
(提示:中文版在2楼)
I encountered a difficulty in executing "hexo init".
I showed the following when I executed the "hexo init" command on Ubuntu 16.04:
/usr/local/lib/node_modules/hexo-cli/lib/hexo.js:15 function entry(cwd = process.cwd(), args) { ^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.
And...
I can't execute the "hexo -v" command because the result displayed after execution is like this:
/usr/local/lib/node_modules/hexo-cli/lib/hexo.js:15 function entry(cwd = process.cwd(), args) { ^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.
Please help me tell me what I should do now. Thanks.
-From York618
中文版:
我在Ubuntu 16上执行hexo init时显示以下内容:
/usr/local/lib/node_modules/hexo-cli/lib/hexo.js:15 function entry(cwd = process.cwd(), args) { ^
SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/usr/local/lib/node_modules/hexo-cli/bin/hexo:5:1) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)
而且我居然不能执行hexo -v,同样显示:
/usr/local/lib/node_modules/hexo-cli/lib/hexo.js:15 function entry(cwd = process.cwd(), args) { ^
SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/usr/local/lib/node_modules/hexo-cli/bin/hexo:5:1) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)
我服了。现在我急需帮助,能不能给我一点好的建议?
-来自York618
楼主是怎么解决的,我也出现了同样的问题
我也出现了
This problem caused by node.js version. The hexo v3.9.0 and hexo-cli 2.0.0 require node.js +6.9
Your node.js version is very old. Please upgrade.
@York618 Please close if you have already solved.
Thanks :)
感谢😊 现在是配置文件的问题了
Thanks~( ̄▽ ̄~)~
Now I am going to edit the_config.yml
Please look at the Chinese version(line one on this comment)if you know Chinese.
注意,这个帖子会一直open 记住我们的暗号3614哦。
Notice: This issue is 3614. Don't forger(。ò ∀ ó。)
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.