Nx: While creating storybook for a Lib ui project_type_1.projectDir is not a function

Created on 4 Oct 2020  路  3Comments  路  Source: nrwl/nx

Current Behavior

[REACT]
I created a library UI running nx g @nrwl/react:storybook-configuration something then I tried to add storybook support as how it's indicated on the documentation and the youtube tutorial

Then I tried to run nx g @nrwl/react:storybook-configuration project-name but failed with:

project_type_1.projectDir is not a function

Not sure what am I missing.

Screen Shot 2020-10-04 at 11 32 19 AM
Screen Shot 2020-10-04 at 11 32 30 AM

Expected Behavior


Its should created storybook in a specific library when running nx g @nrwl/react:storybook-configuration project-name

Steps to Reproduce




This I'm trying this in a fresh and new nrwl project:

    "@nrwl/eslint-plugin-nx": "10.2.1",
    "@nrwl/jest": "10.3.0",
    "@nrwl/react": "^10.3.0",
    "@nrwl/storybook": "^10.3.0",
    "@nrwl/workspace": "10.2.1",

Failure Logs

Environment


    "@nrwl/eslint-plugin-nx": "10.2.1",
    "@nrwl/jest": "10.3.0",
    "@nrwl/react": "^10.3.0",
    "@nrwl/storybook": "^10.3.0",
    "@nrwl/workspace": "10.2.1",
retry with latest storybook bug

Most helpful comment

Hi @nahumzs,

Your @nrwl/workspace version is misaligned with your other @nrwl/ packages. Can you please update @nrwl/workspace to ^10.3.0 and see if the issue is resolved?

All 3 comments

Hi @nahumzs,

Your @nrwl/workspace version is misaligned with your other @nrwl/ packages. Can you please update @nrwl/workspace to ^10.3.0 and see if the issue is resolved?

Thanks for @FrozenPandaz 's solution.
For me just run npm install @nrwl/workspace@latest to upgrade @nrwl/workspace to the latest version, which is currently ^10.3.0, has solved the problem.

@FrozenPandaz beautiful indeed that solved the issue, TIL:

All the version for @nrwl/... have to run in the same version 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasedwards picture jasedwards  路  3Comments

Svancara picture Svancara  路  3Comments

jon301 picture jon301  路  3Comments

ZempTime picture ZempTime  路  3Comments

about-code picture about-code  路  3Comments