{"action":"created","issue":{"url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/57","repository_url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen","labels_url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/57/comments","events_url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/57/events","html_url":"https://github.com/storybooks/babel-plugin-react-docgen/issues/57","id":346502720,"node_id":"MDU6SXNzdWUzNDY1MDI3MjA=","number":57,"title":"\"Property value expected type of\" error for an unnamed function","user":{"login":"yakirsobelman","id":8408452,"node_id":"MDQ6VXNlcjg0MDg0NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/8408452?v=4","gravatar_id":"","url":"https://api.github.com/users/yakirsobelman","html_url":"https://github.com/yakirsobelman","followers_url":"https://api.github.com/users/yakirsobelman/followers","following_url":"https://api.github.com/users/yakirsobelman/following{/other_user}","gists_url":"https://api.github.com/users/yakirsobelman/gists{/gist_id}","starred_url":"https://api.github.com/users/yakirsobelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakirsobelman/subscriptions","organizations_url":"https://api.github.com/users/yakirsobelman/orgs","repos_url":"https://api.github.com/users/yakirsobelman/repos","events_url":"https://api.github.com/users/yakirsobelman/events{/privacy}","received_events_url":"https://api.github.com/users/yakirsobelman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-01T08:40:51Z","updated_at":"2018-08-14T18:36:37Z","closed_at":"2018-08-14T18:10:13Z","author_association":"NONE","body":"Hi,\r\n\r\nI not sure if this one relates to here or [babel-types](https://github.com/babel/babel/blob/master/packages/babel-types/README.md) but I hope someone here will be able to direct me to the right address.\r\n\r\nI'm using `@storybook/react@4.0.0-alpha.14`.\r\nWhen running `npm run storybook` I'm tackled with the error below (real filenames obfuscated):\r\n```\r\nERROR in ./app/path/to/components/Component.js\r\nModule build failed (from ./node_modules/babel-loader/lib/index.js):\r\nTypeError: c:/dev/myapp/app/path/to/components/Component.js: Property value expected type of string but got null\r\n    at Object.validate (c:\\dev\\app\\node_modules\\babel-types\\lib\\definitions\\index.js:161:13)\r\n    at validate (c:\\dev\\myapp\\node_modules\\babel-types\\lib\\index.js:505:9)\r\n    at Object.builder (c:\\dev\\myapp\\node_modules\\babel-types\\lib\\index.js:466:7)\r\n    at injectDocgenGlobal (c:\\dev\\myapp\\node_modules\\babel-plugin-react-docgen\\lib\\index.js:93:354)\r\n    at c:\\dev\\myapp\\node_modules\\babel-plugin-react-docgen\\lib\\index.js:80:5\r\n    at Array.forEach (<anonymous>)\r\n    at injectReactDocgenInfo (c:\\dev\\myapp\\node_modules\\babel-plugin-react-docgen\\lib\\index.js:74:17)\r\n    at PluginPass.exit (c:\\dev\\myapp\\node_modules\\babel-plugin-react-docgen\\lib\\index.js:14:11)\r\n    at newFn (c:\\dev\\myapp\\node_modules\\babel-traverse\\lib\\visitors.js:276:21)\r\n    at NodePath._call (c:\\dev\\myapp\\node_modules\\babel-traverse\\lib\\path\\context.js:76:18)\r\n @ ./app/path/to/components/AnotherComponent.js 17:0-88 225:10-27\r\n @ ./stories/somesection.stories.js\r\n @ ./stories/index.stories.js\r\n @ ./.storybook/config.js\r\n @ multi ./node_modules/@storybook/core/dist/server/config/polyfills.js ./node_modules/@storybook/core/dist/server/config/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true\r\n```\r\nAfter some research it appears that `Component.js` directly exports an unnamed function like this:\r\n```javascript\r\nexport default (data) => (\r\n  data.map(node => <div>{node.content}</div>)\r\n)\r\n```\r\nWhen changing it to\r\n```javascript\r\nconst func = (data) => (\r\n  data.map(node => <div>{node.content}</div>)\r\n)\r\n\r\nexport default func\r\n```\r\nEverything's good.\r\nBut it still looks like an issue cause there's nothing wrong with the first snippet as far as I understand."},"comment":{"url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/comments/412973277","html_url":"https://github.com/storybooks/babel-plugin-react-docgen/issues/57#issuecomment-412973277","issue_url":"https://api.github.com/repos/storybooks/babel-plugin-react-docgen/issues/57","id":412973277,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjk3MzI3Nw==","user":{"login":"danielduan","id":1474548,"node_id":"MDQ6VXNlcjE0NzQ1NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1474548?v=4","gravatar_id":"","url":"https://api.github.com/users/danielduan","html_url":"https://github.com/danielduan","followers_url":"https://api.github.com/users/danielduan/followers","following_url":"https://api.github.com/users/danielduan/following{/other_user}","gists_url":"https://api.github.com/users/danielduan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielduan/subscriptions","organizations_url":"https://api.github.com/users/danielduan/orgs","repos_url":"https://api.github.com/users/danielduan/repos","events_url":"https://api.github.com/users/danielduan/events{/privacy}","received_events_url":"https://api.github.com/users/danielduan/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T18:36:37Z","updated_at":"2018-08-14T18:36:37Z","author_association":"MEMBER","body":"published fix as `babel-plugin-react-docgen@2.0.0-rc.2`"}}
{"actor":{"display_login":"danielduan"}}