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

1.4k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

The command is correct.

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