`nrwl/react` not generating storybook and cypress test
See original GitHub issueCurrent Behavior
Using CLI I am trying to generate storybook and cypress test components but it’s giving us an error
Cannot file react component in file
Using these set of commands to generate
nx g @nrwl/react:component-story --project=dsm-atoms --componentPath=/lib/st-tag/st-tag.tsx
nx g @nrwl/react:component-cypress-spec --project=dsm-atoms --componentPath=/lib/st-tag/st-tag.tsx
The component exists and was generated by using nx cli at the specified path
nx g @nrwl/react:component st-tag --project=dsm-atoms --dry-run
Expected Behavior
Generate storybook and cypress test using CLI
Steps to Reproduce
Mentioned above
Failure Logs

Environment
Report Generated using nx report
Node : 14.17.6 OS : darwin x64 npm : 7.24.1
nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 12.9.0 @nrwl/cypress : 12.9.0 @nrwl/devkit : 12.9.0 @nrwl/eslint-plugin-nx : 12.9.0 @nrwl/express : Not Found @nrwl/jest : 12.9.0 @nrwl/linter : 12.9.0 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/react : 12.9.0 @nrwl/schematics : Not Found @nrwl/tao : 12.9.0 @nrwl/web : 12.9.0 @nrwl/workspace : 12.9.0 @nrwl/storybook : 12.9.0 @nrwl/gatsby : Not Found typescript : 4.3.5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
@puku0x alright but it’s giving me the same error on generating story as well and even after adding a default. Yet still not able to generate the story and e2e test.
It works for me if I generate a React component with Nx and then use the
component-story
generator like@MuhammadAnas190 can you paste here how the component looks like? Doesn’t need to have the implementation itself, but the main component function and exports etc would be helpful. Thanks 😃