@nrwl/react: Error during Storybook generation (TypeError: Cannot read properties of undefined (reading 'text'))
See original GitHub issueCurrent Behavior
Error during storybook configguration creation
Expected Behavior
No errors
Steps to Reproduce
const AnyOfCustomOperatorComponentNew = (props: any) => {
const onValueChanged = useCallback(
e => {
props.data.setValue(e.value && e.value.length ? e.value : null);
},
[props.data]
);
return (
<div>test</div>
);
};
Failure Logs
NX Cannot read properties of undefined (reading ‘text’)
TypeError: Cannot read properties of undefined (reading ‘text’) at getComponentPropsInterface (D:\sources\rmboa\node_modules@nrwl\react\src\utils\ast-utils.js:425:54) at getDefaultsForComponent (D:\sources\rmboa\node_modules@nrwl\react\src\utils\component-props.js:23:71) at findPropsAndGenerateFile (D:\sources\rmboa\node_modules@nrwl\react\src\generators\component-story\component-story.js:51:94) at D:\sources\rmboa\node_modules@nrwl\react\src\generators\component-story\component-story.js:38:17 at Array.forEach (<anonymous>) at createComponentStoriesFile (D:\sources\rmboa\node_modules@nrwl\react\src\generators\component-story\component-story.js:37:28) at D:\sources\rmboa\node_modules@nrwl\react\src\generators\component-story\component-story.js:68:9 at Generator.next (<anonymous>) at D:\sources\rmboa\node_modules\tslib\tslib.js:118:75 at new Promise (<anonymous>)
Environment
Node : 16.17.0 OS : win32 x64 npm : 8.15.0
nx : 14.7.5 @nrwl/angular : Not Found @nrwl/cypress : 14.7.5 @nrwl/detox : Not Found @nrwl/devkit : 14.7.5 @nrwl/eslint-plugin-nx : 14.7.5 @nrwl/express : 14.7.5 @nrwl/jest : 14.7.5 @nrwl/js : 14.7.5 @nrwl/linter : 14.7.5 @nrwl/nest : 14.7.5 @nrwl/next : Not Found @nrwl/node : 14.7.5 @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : 14.7.5 @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.7.5 @nrwl/web : 14.7.5 @nrwl/workspace : 14.7.5 typescript : 4.8.3
Local workspace plugins:
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
@mandarini thanks for fix, I totally forget about repro request
Ok, so I’ll just push the above mentioned fix. Thanks!