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

DEBUG=* everblog build出现了错误 #8

Closed
itgoyo opened this issue Mar 1, 2018 · 11 comments
Closed

DEBUG=* everblog build出现了错误 #8

itgoyo opened this issue Mar 1, 2018 · 11 comments

Comments

@itgoyo
Copy link

itgoyo commented Mar 1, 2018

@nswbmw 你好,我在使用everblog的时候,运行DEBUG=* everblog build出现了以下错误:

✘ itgoyo@itgoyo  ~  cd Hexo 
 itgoyo@itgoyo  ~/Hexo  DEBUG=* everblog build
Error in Thrift HTTP response: 404
(node:17781) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
(node:17781) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/transport/memBuffer.js:29
    if (this.offset + len > this.buffer.length) throw Error('MemBuffer overrun');
                                                ^

Error: MemBuffer overrun
    at MemBuffer.read (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/transport/memBuffer.js:29:55)
    at BinaryProtocol.readMessageBegin (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/protocol/binaryProtocol.js:203:38)
    at Thrift.Method.processResponse (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/thrift.js:184:27)
    at Thrift.Method.<anonymous> (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/thrift.js:165:42)
    at wrapTransport (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/protocol/binaryProtocol.js:48:20)
    at IncomingMessage.<anonymous> (/home/itgoyo/.nvm/versions/node/v8.1.2/lib/node_modules/everblog/node_modules/evernote/lib/thrift/transport/binaryHttpTransport.js:82:27)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1047:12)
    at _combinedTickCallback (internal/process/next_tick.js:102:11)

if (this.offset + len > this.buffer.length) throw Error('MemBuffer overrun')google查了一下,跳转到了

evernote/evernote-sdk-js/issues
里面有给出try catch的,但是不是一样的代码,由于不是很懂网站端的知识,请问这个要怎么解决呢?希望您能在闲暇之余,解答一下,拜谢。

@nswbmw
Copy link
Owner

nswbmw commented Mar 1, 2018

应该是笔记内包含大的内嵌附件引起的,你看下笔记内容。

@itgoyo
Copy link
Author

itgoyo commented Mar 1, 2018

嗯,原因是文件太大导致的是么?我笔记里面我是单独出来的一个测试notebook,只有一篇短文章,还有_config.yml,仅仅这两个文件,它不会遍历我其他的笔记本内容吧?

@nswbmw
Copy link
Owner

nswbmw commented Mar 1, 2018

@itgoyo 不会,只会读取 ~/.everblogrc 你配置的笔记本。你可以自己调试下,我的话可能会这样调试:删了那篇短文章,重新创建个笔记随便输入点保存,everblog build

@itgoyo
Copy link
Author

itgoyo commented Mar 1, 2018

好的,谢谢,我尝试一下您的方法, 如果不行的话,我换一下其他系统环境试试。

@itgoyo
Copy link
Author

itgoyo commented Mar 1, 2018

我之前的环境是 ubuntu 的环境,看到您教程的截图是在 mac下的我也在 mac 下尝试了,还是报同一个错误。请问您那边的 node版本是多少呢?我这边的是v8.9.4

我还发现一个地方,就是获取token 的地方你给的链接是https://www.evernote.com/api/DeveloperToken.action
我用的是https://app.yinxiang.com/api/DeveloperToken.action因为用 Alfred 的 evernote 有使用到过,所以直接用原来的了,你觉得有没有可能是这个可能?

@nswbmw
Copy link
Owner

nswbmw commented Mar 1, 2018

@itgoyo 印象笔记不支持外链,所以建议用 evernote 国际版,否则 build 后内嵌图片无法正常显示

@itgoyo
Copy link
Author

itgoyo commented Mar 2, 2018

好的谢谢,这两天申请一下国际版的token,之后我再从头试试。

@itgoyo itgoyo closed this as completed Mar 2, 2018
@itgoyo itgoyo reopened this Mar 6, 2018
@itgoyo
Copy link
Author

itgoyo commented Mar 6, 2018

@nswbmw 您好,刚刚又试了一遍,加上sudo 之后DEBUG=* everblog build,错误变成了

/usr/local/lib/node_modules/everblog/bin/everblog:55
async function showConfig () {
      ^^^^^^^^

SyntaxError: Unexpected token function
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:990:3

出现这个的错误的原因可能是哪里呢?
是由于.everblogrc,没写正确么?

@nswbmw
Copy link
Owner

nswbmw commented Mar 6, 2018

升级到 node@8+

@itgoyo
Copy link
Author

itgoyo commented Mar 8, 2018

你好,请问使用everblog生成的页面中如果想要添加tag标签要怎么做呢,之前如果是.md的话,都会在文章头部写好类似的

---
title: xxx
date: '2017/12/15 18:03:02' 
updated: '2017/12/18 14:38:31' 
tags: 
- deep learning 
- neural network 
---

但是如果使用everblog生成的页面呢?

@nswbmw
Copy link
Owner

nswbmw commented Mar 8, 2018

可以。everblog默认抓了 evernote 笔记自带的 tag,如果你用 everblog-adaptor-hexo,这个里面也会解析头部的信息(你上面贴出来的),然后 merge evernote 返回的 attributes,最终会写回到生成的 md 里,你试试吧

@nswbmw nswbmw closed this as completed Mar 8, 2018
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