Skip to content

Creating a Cypress App for a React Storybook Library Fails #21770

Closed

Description

@smasala

Current Behavior

npx nx g @nx/storybook:cypress-project myReactLibWithStorybook fails

>  NX   Cannot read properties of undefined (reading 'options')


TypeError: Cannot read properties of undefined (reading 'options')
    at updateAngularJsonBuilder (/node_modules/@nx/storybook/src/generators/cypress-project/cypress-project.js:96:26)

Expected Behavior

A Cypress App for the UI library is generated

GitHub Repo

No response

Steps to Reproduce

  1. generate React UI library
  2. add storybook configuration to the react library
  3. run npx nx g @nx/storybook:cypress-project myReactLibWithStorybook

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 21.6.1
   OS     : linux-x64
   npm    : 10.2.4
   
   nx                 : 18.0.4
   @nx/js             : 18.0.4
   @nx/jest           : 18.0.4
   @nx/linter         : 18.0.4
   @nx/eslint         : 18.0.4
   @nx/workspace      : 18.0.4
   @nx/cypress        : 18.0.4
   @nx/devkit         : 18.0.4
   @nx/eslint-plugin  : 18.0.4
   @nx/react          : 18.0.4
   @nx/rollup         : 18.0.4
   @nx/storybook      : 18.0.4
   @nrwl/tao          : 18.0.4
   @nx/web            : 18.0.4
   @nx/webpack        : 18.0.4
   typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

should read:

The line should read ...e2eTarget?.options - there is no app, since we are generating it at this point, so e2eTarget is of course undefined. If you manually add ? then the generator run successfully.

Activity

  1. Coly010 commented on May 13, 2024

    @Coly010
    Contributor

    Thank you for bringing this issue to our attention! I want to assure you that I will take a look as soon as I can.

  2. github-actions commented on Jun 14, 2024

    @github-actions
    Contributor

    This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

  3. locked as resolved and limited conversation to collaborators on Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions