{"action":"created","issue":{"url":"https://api.github.com/repos/aichaos/rivescript-js/issues/39","labels_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/39/comments","events_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/39/events","html_url":"https://github.com/aichaos/rivescript-js/issues/39","id":101314284,"number":39,"title":"babel problem","user":{"login":"dcsan","id":514002,"avatar_url":"https://avatars.githubusercontent.com/u/514002?v=3","gravatar_id":"","url":"https://api.github.com/users/dcsan","html_url":"https://github.com/dcsan","followers_url":"https://api.github.com/users/dcsan/followers","following_url":"https://api.github.com/users/dcsan/following{/other_user}","gists_url":"https://api.github.com/users/dcsan/gists{/gist_id}","starred_url":"https://api.github.com/users/dcsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcsan/subscriptions","organizations_url":"https://api.github.com/users/dcsan/orgs","repos_url":"https://api.github.com/users/dcsan/repos","events_url":"https://api.github.com/users/dcsan/events{/privacy}","received_events_url":"https://api.github.com/users/dcsan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-17T00:55:16Z","updated_at":"2015-08-17T06:22:27Z","closed_at":null,"body":"I was trying to use Rivescript with a Babel transpiler package installed, and getting the following error below. disabling Babel makes Rivescript (node package) work. it looks like you're using string.includes somehow in your own code, did you patch String? or maybe you were writing in CS?\r\n\r\n\r\n```\r\nI20150816-17:52:35.901(-7)? brain startup     \r\nI20150816-17:52:35.925(-7)? Batch #0 has finished loading!\r\nW20150816-17:52:35.928(-7)? (STDERR) \r\nW20150816-17:52:35.928(-7)? (STDERR) /Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/inheritance.js:75\r\nW20150816-17:52:35.928(-7)? (STDERR)   for (includes in rs._topics[topic].includes) {\r\nW20150816-17:52:35.928(-7)? (STDERR)                                     ^\r\nW20150816-17:52:35.932(-7)? (STDERR) TypeError: Cannot read property 'includes' of undefined\r\nW20150816-17:52:35.932(-7)? (STDERR)     at getTopicTree (/Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/inheritance.js:75:37)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at Object.getTopicTree (/Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/inheritance.js:76:31)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at Brain._getReply (/Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/brain.js:89:35)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at Brain.reply (/Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/brain.js:39:20)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at RiveScript.reply (/Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/rivescript.js:460:23)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at loading_done (app/server/lib/Ribot.js:21:31)\r\nW20150816-17:52:35.932(-7)? (STDERR)     at /Users/dc/dev/rikai/telegram/teletest/app/.meteor/local/isopacks/npm-container/npm/node_modules/rivescript/lib/rivescript.js:169:30\r\nW20150816-17:52:35.933(-7)? (STDERR)     at fs.js:272:14\r\nW20150816-17:52:35.933(-7)? (STDERR)     at Object.oncomplete (fs.js:108:15)\r\n=> Exited with code: 8\r\n=> Your application is crashing. Waiting for file change.\r\n```"},"comment":{"url":"https://api.github.com/repos/aichaos/rivescript-js/issues/comments/131692802","html_url":"https://github.com/aichaos/rivescript-js/issues/39#issuecomment-131692802","issue_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/39","id":131692802,"user":{"login":"kirsle","id":1663507,"avatar_url":"https://avatars.githubusercontent.com/u/1663507?v=3","gravatar_id":"","url":"https://api.github.com/users/kirsle","html_url":"https://github.com/kirsle","followers_url":"https://api.github.com/users/kirsle/followers","following_url":"https://api.github.com/users/kirsle/following{/other_user}","gists_url":"https://api.github.com/users/kirsle/gists{/gist_id}","starred_url":"https://api.github.com/users/kirsle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirsle/subscriptions","organizations_url":"https://api.github.com/users/kirsle/orgs","repos_url":"https://api.github.com/users/kirsle/repos","events_url":"https://api.github.com/users/kirsle/events{/privacy}","received_events_url":"https://api.github.com/users/kirsle/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T06:22:27Z","updated_at":"2015-08-17T06:22:27Z","body":"`rs._topics[topic].includes`\r\n\r\nHere, the `includes` attribute is a list of topics included by the current `topic`, i.e. when RS code does `> topic a includes b`\r\n\r\nI'm guessing your babel integration is editing RiveScript's data structures behind its back. It's not a bug with RiveScript itself in this case, just make sure you implement all the same data structures. I can't recommend messing with the internal data structures though because they're subject to change with future versions."}}