{"action":"opened","issue":{"url":"https://api.github.com/repos/substack/babel-plugin-jsx-factory/issues/6","labels_url":"https://api.github.com/repos/substack/babel-plugin-jsx-factory/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/substack/babel-plugin-jsx-factory/issues/6/comments","events_url":"https://api.github.com/repos/substack/babel-plugin-jsx-factory/issues/6/events","html_url":"https://github.com/substack/babel-plugin-jsx-factory/issues/6","id":103299830,"number":6,"title":"Babel internal error is reported when JSX helper isn't imported","user":{"login":"killercup","id":20063,"avatar_url":"https://avatars.githubusercontent.com/u/20063?v=3","gravatar_id":"","url":"https://api.github.com/users/killercup","html_url":"https://github.com/killercup","followers_url":"https://api.github.com/users/killercup/followers","following_url":"https://api.github.com/users/killercup/following{/other_user}","gists_url":"https://api.github.com/users/killercup/gists{/gist_id}","starred_url":"https://api.github.com/users/killercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killercup/subscriptions","organizations_url":"https://api.github.com/users/killercup/orgs","repos_url":"https://api.github.com/users/killercup/repos","events_url":"https://api.github.com/users/killercup/events{/privacy}","received_events_url":"https://api.github.com/users/killercup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-26T15:38:11Z","updated_at":"2015-08-26T15:38:11Z","closed_at":null,"body":"When I compile this code:\r\n\r\n```jsx\r\n/** @jsx h */\r\nfunction formPage() {\r\n  return <h1>Hello</h1>;\r\n}\r\n```\r\n\r\nwith _babel_ 5.8.21 and _babel-plugin-jsx-factory_ 1.0.1, I get this error:\r\n\r\n```text\r\nReferenceError: test.js: There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.\r\n    at File.errorWithNode ($PROJECT/node_modules/babel-core/lib/transformation/file/index.js:468:13)\r\n    at NodePath.errorWithNode ($PROJECT/node_modules/babel-core/lib/traversal/path/index.js:151:26)\r\n    at NodePath.ReferencedIdentifier ($PROJECT/node_modules/babel-plugin-undeclared-variables-check/lib/index.js:58:20)\r\n    at NodePath.<anonymous> ($PROJECT/node_modules/babel-core/lib/traversal/visitors.js:217:17)\r\n    at NodePath.call ($PROJECT/node_modules/babel-core/lib/traversal/path/context.js:56:28)\r\n    at NodePath.visit ($PROJECT/node_modules/babel-core/lib/traversal/path/context.js:89:8)\r\n    at TraversalContext.visitSingle ($PROJECT/node_modules/babel-core/lib/traversal/context.js:131:12)\r\n    at TraversalContext.visit ($PROJECT/node_modules/babel-core/lib/traversal/context.js:147:19)\r\n    at Function.traverse.node ($PROJECT/node_modules/babel-core/lib/traversal/index.js:76:17)\r\n    at NodePath.visit ($PROJECT/node_modules/babel-core/lib/traversal/path/context.js:106:26)\r\n```\r\n\r\nIt took me a while to realize what is wrong with my code (the actual code is much longer). _Of course,_ I forgot to import `h`, so JSX can't work!\r\n\r\nIt would be great to get custom error message for this case, it should not be an \"internal error\"."}}