cometlj / hexo-translate-title

使用Google翻译,百度翻译和有道翻译将Hexo文章中的汉字标题转成英文标题
https://cometlj.github.io
Other
43 stars 17 forks source link

install hexo-traslate-title后, hexo 相关命令失效 #15

Closed HarborZeng closed 5 years ago

HarborZeng commented 5 years ago

OS: win10 1803

node: 8.11.3

npm: 5.6.0

博客已经正常运行几天了,在装您这个插件之前代码没有任何问题。

使用npm install hexo-translate-title --save命令之后,package.json被多加了一条,这没问题,然后在配置文件_config.yml里面加上相关配置之后,当我执行hexo s的时候报错如下:

ERROR Local hexo not found in ~\Documents\tellyouwhat.cn
ERROR Try running: 'npm install hexo --save'

执行npm install,报错如下:

npm WARN deprecated titlecase@1.1.2: no longer maintained
npm ERR! Unexpected end of JSON input while parsing near '...ylish":"^1.0.0","moch'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxxxxx\xxx.log

感觉node_module被破坏了

重新在某处hexo init xxx,把node_module文件夹替换过来,就正常了,但是依旧无法使用您开发的插件。

如果执行按照提示npm install hexo --save

再执行hexo s报错如下:

ERROR Plugin load failed: hexo-renderer-marked
Error: EISDIR: illegal operation on a directory, read
ERROR Plugin load failed: hexo-server
Error: EISDIR: illegal operation on a directory, read
ERROR Plugin load failed: hexo-renderer-stylus
Error: EISDIR: illegal operation on a directory, read
Usage: hexo <command>

......some commad flag hint......
HarborZeng commented 5 years ago

problen solved. git clone your repo, add dependency to package.json manually, cnpm install, and it works like a charm......