{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/1831","labels_url":"https://api.github.com/repos/babel/babel/issues/1831/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/1831/comments","events_url":"https://api.github.com/repos/babel/babel/issues/1831/events","html_url":"https://github.com/babel/babel/issues/1831","id":91008009,"number":1831,"title":"Babel 5.6.7 spewing \"Cannot read property key of null\"","user":{"login":"jsg2021","id":577453,"avatar_url":"https://avatars.githubusercontent.com/u/577453?v=3","gravatar_id":"","url":"https://api.github.com/users/jsg2021","html_url":"https://github.com/jsg2021","followers_url":"https://api.github.com/users/jsg2021/followers","following_url":"https://api.github.com/users/jsg2021/following{/other_user}","gists_url":"https://api.github.com/users/jsg2021/gists{/gist_id}","starred_url":"https://api.github.com/users/jsg2021/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsg2021/subscriptions","organizations_url":"https://api.github.com/users/jsg2021/orgs","repos_url":"https://api.github.com/users/jsg2021/repos","events_url":"https://api.github.com/users/jsg2021/events{/privacy}","received_events_url":"https://api.github.com/users/jsg2021/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-25T16:17:48Z","updated_at":"2015-06-25T18:19:52Z","closed_at":null,"body":"[deleted red-herring]\r\n\r\nHere is the stack trace:\r\n\r\n```\r\nCannot read property 'key' of null\r\n    at add (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:317:19)\r\n    at add (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:299:11)\r\n    at Scope.generateUidIdentifierBasedOnNode (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:322:5)\r\n    at NodePath.exit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/transformers/es6/properties.computed.js:93:25)\r\n    at NodePath.call (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:55:28)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:106:12)\r\n    at TraversalContext.visitSingle (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:106:12)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:118:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:105:26)\r\n    at TraversalContext.visitMultiple (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:86:16)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:116:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:105:26)\r\n    at TraversalContext.visitSingle (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:106:12)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:118:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at traverse (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:49:14)\r\n    at PluginPass.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/plugin-pass.js:38:32)\r\n    at File.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/file/index.js:590:12)\r\n    at /Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/pipeline.js:125:19\r\n    at File.wrap (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/file/index.js:604:16)\r\n    at Pipeline.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/pipeline.js:122:17)\r\n    at transpile (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-loader/index.js:10:22)\r\n    at Object.module.exports (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-loader/index.js:65:12)\r\n```"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/115352776","html_url":"https://github.com/babel/babel/issues/1831#issuecomment-115352776","issue_url":"https://api.github.com/repos/babel/babel/issues/1831","id":115352776,"user":{"login":"jsg2021","id":577453,"avatar_url":"https://avatars.githubusercontent.com/u/577453?v=3","gravatar_id":"","url":"https://api.github.com/users/jsg2021","html_url":"https://github.com/jsg2021","followers_url":"https://api.github.com/users/jsg2021/followers","following_url":"https://api.github.com/users/jsg2021/following{/other_user}","gists_url":"https://api.github.com/users/jsg2021/gists{/gist_id}","starred_url":"https://api.github.com/users/jsg2021/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsg2021/subscriptions","organizations_url":"https://api.github.com/users/jsg2021/orgs","repos_url":"https://api.github.com/users/jsg2021/repos","events_url":"https://api.github.com/users/jsg2021/events{/privacy}","received_events_url":"https://api.github.com/users/jsg2021/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T18:19:52Z","updated_at":"2015-06-25T18:19:52Z","body":"here is one of the smaller files... as for options I don't have any... beyond the babel loader's runtime setting.  I don't have any plugins, nor rc file.\r\n\r\n```\r\nimport React from 'react';\r\nimport {EventEmitter} from 'events';\r\n\r\nfunction emit(o, event, ...data) {\r\n\tlet e = o.state.dndEventEmitter;\r\n\te.emit.apply(e, [event].concat(data));\r\n}\r\n\r\nconst onDragStart = 'dnd:mixin:onDragStart';\r\nconst onDragEnd = 'dnd:mixin:onDragEnd';\r\nconst onDrag = 'dnd:mixin:onDrag';\r\nconst onDragOver = 'dnd:mixin:onDragOver';\r\nconst onDrop = 'dnd:mixin:onDrop';\r\n\r\nexport default {\r\n\r\n\tgetInitialState () {\r\n\t\treturn {\r\n\t\t\tcurrentDragItem: null,\r\n\t\t\tdndEventEmitter: new EventEmitter()\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tchildContextTypes: {\r\n\t\t//Common:\r\n\t\tcurrentDragItem: React.PropTypes.object,\r\n\t\tdndEvents: React.PropTypes.object,\r\n\r\n\t\t//For Draggable\r\n\t\tonDragStart: React.PropTypes.func,\r\n\t\tonDragEnd: React.PropTypes.func,\r\n\t\tonDrag: React.PropTypes.func,\r\n\r\n\t\t//For Droppable\r\n\t\tlastDragOver: React.PropTypes.object,\r\n\t\tonDragOver: React.PropTypes.func,\r\n\t\tonDrop: React.PropTypes.func\r\n\t},\r\n\r\n\r\n\tgetChildContext () {\r\n\t\tlet s = this.state;\r\n\t\treturn {\r\n\t\t\tdndEvents: s.dndEventEmitter,\r\n\t\t\tcurrentDragItem: s.currentDragItem || null,\r\n\t\t\tlastDragOver: s.lastDragOver || null,\r\n\r\n\t\t\tonDragStart: this[onDragStart],\r\n\t\t\tonDragEnd: this[onDragEnd],\r\n\t\t\tonDrag: this[onDrag],\r\n\r\n\t\t\tonDragOver: this[onDragOver],\r\n\t\t\tonDrop: this[onDrop]\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tgetNewUniqueToken () {\r\n\t\t// This looks confusing, I know. This `token`\r\n\t\t// object is passed as a value to the DragTarget\r\n\t\t// accepts prop. Its also set to the type prop\r\n\t\t// of the Draggable. When a Draggable is over a\r\n\t\t// DropTarget, the DropTarget compares the\r\n\t\t// Draggable's type with its accepts list, if\r\n\t\t// it accepts it, the DropTarget will let the\r\n\t\t// Draggable drop onto it.\r\n\t\t//\r\n\t\t// The accepts function on this new instance of\r\n\t\t// an anonymouse object will test if the argument\r\n\t\t// passed to it is the exact same object as `token`.\r\n\r\n\t\tlet token = { accepts: (t)=> t === token };\r\n\r\n\t\treturn token;\r\n\t},\r\n\r\n\r\n\tgetNewCombinationToken (...tokens) {\r\n\t\treturn {\r\n\t\t\taccepts: (t)=> tokens.filter(x=> x === t || x.accepts(t)).length > 0\r\n\t\t};\r\n\t},\r\n\r\n\r\n\t[onDragStart] (item) {\r\n\t\tthis.setState({\r\n\t\t\tcurrentDragItem: item,\r\n\t\t\tlastDragOver: null\r\n\t\t});\r\n\t\temit(this, 'dragStart');\r\n\t},\r\n\r\n\r\n\t[onDragEnd] () {\r\n\t\tlet lastOver = this.state.lastDragOver || {};\r\n\t\tlet {target} = lastOver;\r\n\t\tlet dropped = false;\r\n\r\n\t\tif (target) {\r\n\t\t\tdropped = target.handleDrop();\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tcurrentDragItem: null\r\n\t\t});\r\n\r\n\t\temit(this, 'dragEnd');\r\n\t\treturn dropped;\r\n\t},\r\n\r\n\r\n\t[onDrag] (draggable, event, data) {\r\n\t\temit(this, 'drag', data);\r\n\t},\r\n\r\n\r\n\t[onDragOver] (target, sender) {\r\n\t\tlet last = this.state.lastDragOver || {};\r\n\t\tlet lastTarget = last.target;\r\n\r\n\t\tif (!target && lastTarget && lastTarget !== sender) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tlastDragOver: {\r\n\t\t\t\tsource: this.state.currentDragItem,\r\n\t\t\t\ttarget: target\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\r\n\t[onDrop] (target) {\r\n\t\tlet drop = {\r\n\t\t\tsource: this.state.currentDragItem,\r\n\t\t\ttarget: target\r\n\t\t};\r\n\r\n\t\tthis.setState({\r\n\t\t\tlastDragOver: null\r\n\t\t});\r\n\r\n\t\temit(this, 'drop', drop);\r\n\r\n\t\tif (this.onDrop) {\r\n\t\t\tthis.onDrop(drop);\r\n\t\t}\r\n\t}\r\n};\r\n```\r\n\r\n```\r\nERROR in ./src/main/js/common/dnd/Mixin.js\r\nModule build failed: TypeError: /Users/jgrimes/Workspace/nti.web.mobile/src/main/js/common/dnd/Mixin.js: Cannot read property 'key' of null\r\n    at add (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:317:19)\r\n    at add (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:299:11)\r\n    at Scope.generateUidIdentifierBasedOnNode (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/scope/index.js:322:5)\r\n    at NodePath.exit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/transformers/es6/properties.computed.js:93:25)\r\n    at NodePath.call (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:55:28)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:106:12)\r\n    at TraversalContext.visitSingle (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:106:12)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:118:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:105:26)\r\n    at TraversalContext.visitMultiple (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:86:16)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:116:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at NodePath.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/path/context.js:105:26)\r\n    at TraversalContext.visitSingle (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:106:12)\r\n    at TraversalContext.visit (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/context.js:118:19)\r\n    at Function.traverse.node (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:66:17)\r\n    at traverse (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/traversal/index.js:49:14)\r\n    at PluginPass.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/plugin-pass.js:38:32)\r\n    at File.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/file/index.js:590:12)\r\n    at /Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/pipeline.js:125:19\r\n    at File.wrap (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/file/index.js:604:16)\r\n    at Pipeline.transform (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-core/lib/babel/transformation/pipeline.js:122:17)\r\n    at transpile (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-loader/index.js:12:22)\r\n    at Object.module.exports (/Users/jgrimes/Workspace/nti.web.mobile/node_modules/babel-loader/index.js:69:12)\r\n @ ./src/main/js/common/dnd/index.js 17:13-31\r\n```"}}