{"action":"created","issue":{"url":"https://api.github.com/repos/hexojs/hexo/issues/1728","labels_url":"https://api.github.com/repos/hexojs/hexo/issues/1728/labels{/name}","comments_url":"https://api.github.com/repos/hexojs/hexo/issues/1728/comments","events_url":"https://api.github.com/repos/hexojs/hexo/issues/1728/events","html_url":"https://github.com/hexojs/hexo/issues/1728","id":128930824,"number":1728,"title":"asciidoctor.js won't run with Hexo","user":{"login":"loki2302","id":906606,"avatar_url":"https://avatars.githubusercontent.com/u/906606?v=3","gravatar_id":"","url":"https://api.github.com/users/loki2302","html_url":"https://github.com/loki2302","followers_url":"https://api.github.com/users/loki2302/followers","following_url":"https://api.github.com/users/loki2302/following{/other_user}","gists_url":"https://api.github.com/users/loki2302/gists{/gist_id}","starred_url":"https://api.github.com/users/loki2302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loki2302/subscriptions","organizations_url":"https://api.github.com/users/loki2302/orgs","repos_url":"https://api.github.com/users/loki2302/repos","events_url":"https://api.github.com/users/loki2302/events{/privacy}","received_events_url":"https://api.github.com/users/loki2302/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T20:23:43Z","updated_at":"2016-01-27T03:03:08Z","closed_at":null,"body":"Originally here: hcoona/hexo-renderer-asciidoc#3 - this issue is a blocker for hexo-renderer-asciidoc plugin.\r\n\r\n`asciidoctor.js` fails to initialize when loaded in Hexo context. Minimal steps to reproduce:\r\n1. Generate a minimal Hexo blog with `hexo init`\r\n2. `npm install --save asciidoctor.js`\r\n3. `mkdir scripts`\r\n4. Put `dummy.js` into `scripts` with content `require('asciidoctor.js')();` (this exact one line)\r\n5. Run `hexo generate`\r\n\r\nThe error message will appear:\r\n\r\n    /home/loki2302/hexo-experiment/blog1/node_modules/JSONStream/index.js:91\r\n          this.stack[k].value = null\r\n                              ^\r\n\r\n    TypeError: Cannot assign to read only property 'value' of true\r\n        at Parser.parser.onValue (/home/loki2302/hexo-experiment/blog1/node_modules/JSONStream/index.js:91:27)\r\n        at Parser.proto.emit (/home/loki2302/hexo-experiment/blog1/node_modules/jsonparse/jsonparse.js:265:8)\r\n        at Parser.proto.onToken (/home/loki2302/hexo-experiment/blog1/node_modules/jsonparse/jsonparse.js:276:12)\r\n        at Parser.parser.onToken (/home/loki2302/hexo-experiment/blog1/node_modules/JSONStream/index.js:96:12)\r\n        at Parser.proto.write (/home/loki2302/hexo-experiment/blog1/node_modules/jsonparse/jsonparse.js:202:20)\r\n        at Stream.<anonymous> (/home/loki2302/hexo-experiment/blog1/node_modules/JSONStream/index.js:23:12)\r\n        at Stream.stream.write (/home/loki2302/hexo-experiment/blog1/node_modules/through/index.js:26:11)\r\n        at ReadStream.ondata (_stream_readable.js:528:20)\r\n        at emitOne (events.js:77:13)\r\n        at ReadStream.emit (events.js:169:7)\r\n        at readableAddChunk (_stream_readable.js:146:16)\r\n        at ReadStream.Readable.push (_stream_readable.js:110:10)\r\n        at onread (fs.js:1822:12)\r\n        at callback (/home/loki2302/hexo-experiment/blog1/node_modules/nunjucks/node_modules/graceful-fs/polyfills.js:207:17)\r\n        at FSReqWrap.wrapper [as oncomplete] (fs.js:614:17)\r\n\r\nMy environment details:\r\n\r\n    loki2302@ubuntu:~/hexo-experiment/blog1$ hexo version\r\n    hexo: 3.1.1\r\n    os: Linux 3.19.0-47-generic linux x64\r\n    http_parser: 2.5.0\r\n    node: 5.0.0\r\n    v8: 4.6.85.28\r\n    uv: 1.7.5\r\n    zlib: 1.2.8\r\n    ares: 1.10.1-DEV\r\n    icu: 56.1\r\n    modules: 47\r\n    openssl: 1.0.2d\r\n"},"comment":{"url":"https://api.github.com/repos/hexojs/hexo/issues/comments/175360781","html_url":"https://github.com/hexojs/hexo/issues/1728#issuecomment-175360781","issue_url":"https://api.github.com/repos/hexojs/hexo/issues/1728","id":175360781,"user":{"login":"hcoona","id":712433,"avatar_url":"https://avatars.githubusercontent.com/u/712433?v=3","gravatar_id":"","url":"https://api.github.com/users/hcoona","html_url":"https://github.com/hcoona","followers_url":"https://api.github.com/users/hcoona/followers","following_url":"https://api.github.com/users/hcoona/following{/other_user}","gists_url":"https://api.github.com/users/hcoona/gists{/gist_id}","starred_url":"https://api.github.com/users/hcoona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hcoona/subscriptions","organizations_url":"https://api.github.com/users/hcoona/orgs","repos_url":"https://api.github.com/users/hcoona/repos","events_url":"https://api.github.com/users/hcoona/events{/privacy}","received_events_url":"https://api.github.com/users/hcoona/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T03:03:08Z","updated_at":"2016-01-27T03:03:08Z","body":"Can reproduce it.\r\n\r\nMore details with debug option.\r\n\r\n```\r\n10:52:49.950 DEBUG Hexo version: 3.1.1\r\n10:52:49.950 DEBUG Working directory: R:\\ad\\\r\n10:52:50.074 DEBUG Config loaded: R:\\ad\\_config.yml\r\n10:52:50.265 DEBUG Script loaded: scripts\\dummy.js\r\n10:52:50.280 DEBUG Script loaded: themes\\landscape\\scripts\\fancybox.js\r\n10:52:50.296 DEBUG Plugin loaded: hexo-generator-category\r\n10:52:50.296 DEBUG Plugin loaded: hexo-generator-archive\r\n10:52:50.452 DEBUG Plugin loaded: hexo-renderer-stylus\r\n10:52:50.452 DEBUG Plugin loaded: hexo-generator-index\r\n10:52:50.468 DEBUG Plugin loaded: hexo-generator-tag\r\n10:52:50.468 DEBUG Plugin loaded: hexo-renderer-ejs\r\n10:52:50.593 DEBUG Plugin loaded: hexo-server\r\n10:52:50.665 DEBUG Plugin loaded: hexo-renderer-marked\r\n10:52:50.665 DEBUG Loading database.\r\nR:\\ad\\node_modules\\JSONStream\\index.js:91\r\n      this.stack[k].value = null\r\n                          ^\r\n\r\nTypeError: Cannot assign to read only property 'value' of true\r\n    at Parser.parser.onValue (R:\\ad\\node_modules\\JSONStream\\index.js:91:27)\r\n    at Parser.proto.emit (R:\\ad\\node_modules\\jsonparse\\jsonparse.js:265:8)\r\n    at Parser.proto.onToken (R:\\ad\\node_modules\\jsonparse\\jsonparse.js:276:12)\r\n    at Parser.parser.onToken (R:\\ad\\node_modules\\JSONStream\\index.js:96:12)\r\n    at Parser.proto.write (R:\\ad\\node_modules\\jsonparse\\jsonparse.js:202:20)\r\n    at Stream.<anonymous> (R:\\ad\\node_modules\\JSONStream\\index.js:23:12)\r\n    at Stream.stream.write (R:\\ad\\node_modules\\through\\index.js:26:11)\r\n    at ReadStream.ondata (_stream_readable.js:529:20)\r\n    at emitOne (events.js:90:13)\r\n    at ReadStream.emit (events.js:182:7)\r\n    at readableAddChunk (_stream_readable.js:147:16)\r\n    at ReadStream.Readable.push (_stream_readable.js:111:10)\r\n    at onread (fs.js:1822:12)\r\n    at callback (R:\\ad\\node_modules\\nunjucks\\node_modules\\graceful-fs\\polyfills.js:207:17)\r\n    at FSReqWrap.wrapper [as oncomplete] (fs.js:614:17)\r\n```\r\n\r\nEnv:\r\n\r\n```\r\nhexo: 3.1.1\r\nos: Windows_NT 10.0.10586 win32 x64\r\nhttp_parser: 2.6.0\r\nnode: 5.5.0\r\nv8: 4.6.85.31\r\nuv: 1.8.0\r\nzlib: 1.2.8\r\nares: 1.10.1-DEV\r\nicu: 56.1\r\nmodules: 47\r\nopenssl: 1.0.2e\r\n```"}}