nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.64k stars 2.36k forks source link

Problem running Storybook on mixed workspaces #5100

Closed mandarini closed 3 years ago

mandarini commented 3 years ago

Current Behavior

On a mixed workspace, when Storybook is added on a different framework it does not run. eg. Workspace with Angular and React libs/apps Add Storybook in React lib or app Works/runs Add Storybook in Angular lib or app Storybook is generated Storybook does not run

Expected Behavior

Storybook works on mixed workspaces.

Steps to Reproduce

Scenario 1:

  1. create-nx-workspace with react app
  2. Generate react lib as well, and one component in react lib, one component in react app
  3. @nrwl/react:storybook-configuration schematic for react lib and react app
  4. nx run <app and lib>:storybook
  5. SUCCESS!!

Scenario 2:

  1. In same workspace, generate ANGULAR lib
  2. generate angular component inside angular lib
  3. @nrwl/angular:storybook-configuration for angular lib
  4. nx run <angular lib>:storybook
  5. ERROR: Cannot find module '@storybook/angular/dist/server/options'

And vice-versa

mandarini commented 3 years ago

@juristr I created this issue

ringodotnl commented 3 years ago

@mandarini getting the same issue with:

also gives: ERROR: Cannot find module '@storybook/angular/dist/server/options'

nayfin commented 3 years ago

I updated @nrwl/storybook to "^11.6.0" and @storybook/angular to "^6.2.1", and that seems to have fixed it. Maybe migrations can be updated to account for this?

github-actions[bot] commented 1 year ago

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.