Search code examples
storybooknrwl-nxangular-storybook

Nx generate get 'Collection "@nrwl/storybook" cannot be resolved.' error


I'm trying to add storybook to exist angular lib in my workspace:

ng generate @nrwl/angular:storybook-configuration <lib-name>

But get a "Collection "@nrwl/storybook" cannot be resolved." error.

Same error when I'm trying to do it with the Nx's VSCode plugin.

Nx v 10.4.4.

How can I fix this?


Solution

  • The command is correct.

    Try run npm i @nrwl/storybook or yarn add @nrwl/storybook first and retry.