$ babel --plugins typecheck test.jsx
~/babel/lib/babel/transformation/file/index.js:600
throw err;
^
TypeError: test.jsx: Cannot read property 'kind' of undefined
at Scope.getAllBindingsOfKind (~/babel/lib/babel/traversal/scope/index.js:824:22)
at TraversalPath.Function (~/node_modules/babel-plugin-typecheck/lib/index.js:41:30)
at TraversalPath.call (~/babel/lib/babel/traversal/path/index.js:833:28)
at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:866:10)
at TraversalContext.visitSingle (~/babel/lib/babel/traversal/context.js:78:43)
at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:89:19)
at Function.traverse.node (~/babel/lib/babel/traversal/index.js:64:17)
at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:883:28)
at TraversalContext.visitMultiple (~/babel/lib/babel/traversal/context.js:67:16)
at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:87:19)
$ babel --version 5.4.2 $ cat test.jsx
$ babel --plugins typecheck test.jsx ~/babel/lib/babel/transformation/file/index.js:600 throw err; ^ TypeError: test.jsx: Cannot read property 'kind' of undefined at Scope.getAllBindingsOfKind (~/babel/lib/babel/traversal/scope/index.js:824:22) at TraversalPath.Function (~/node_modules/babel-plugin-typecheck/lib/index.js:41:30) at TraversalPath.call (~/babel/lib/babel/traversal/path/index.js:833:28) at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:866:10) at TraversalContext.visitSingle (~/babel/lib/babel/traversal/context.js:78:43) at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:89:19) at Function.traverse.node (~/babel/lib/babel/traversal/index.js:64:17) at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:883:28) at TraversalContext.visitMultiple (~/babel/lib/babel/traversal/context.js:67:16) at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:87:19)