Search code examples
angularnpmangular-componentsmonoreponrwl-nx

Nx & Storybook: Cannot read property 'registerOptionsTransform' of undefined


enter image description hereI am trying to install storybook on my workspace installing @nrwl/storybook and follow this guideline but it seems there is an internal error:

Cannot read property 'registerOptionsTransform' of undefined

after the command

nx g @nrwl/angular:storybook-configuration project-name


nx report

>  NX  Report complete - copy this into the issue template

  Node : 14.16.0
  OS   : darwin x64
  npm  : 6.14.11

  nx : Not Found
  @nrwl/angular : 12.0.8
  @nrwl/cli : 12.0.8
  @nrwl/cypress : 12.0.8
  @nrwl/devkit : 12.0.8
  @nrwl/eslint-plugin-nx : 12.0.8
  @nrwl/express : Not Found
  @nrwl/jest : 12.0.8
  @nrwl/linter : 12.0.8
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.0.8
  @nrwl/web : Not Found
  @nrwl/workspace : 12.0.8
  @nrwl/storybook : 12.1.1
  @nrwl/gatsby : Not Found
  typescript : 4.0.7

Thanks in advance Andrea


Solution

  • I found the issue, during migrations Nx doesn't update @angular-devkit/schematics and at some point the old version breaks the workspace. so it's enough to install:

    npm i -D @angular-devkit/schematics@latest