Storybook Install: "Could not read apps/ng-nest/tsconfig.lib.json"
See original GitHub issuePrerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [x ] I am running the latest version
- [ x] I checked the documentation (nx.dev) and found no answer
- [x ] I checked to make sure that this issue has not already been filed
- [x ] I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)
Expected Behavior
The expected behavior is to be able to install Storybook integration given the documentation instructions.
Current Behavior
The current behavior when following the instructions for installing Storybook integration ends with an error “Could not read apps/ng-nest/tsconfig.lib.json” (which makes no sense, because the only tsconfig.lib.json
in the project is in the libs/api-interfaces/tsconfig.lib.json
, and I do not believe there would ever be a apps/ng-nest/tsconfig.lib.json
file).
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
npx create-nx-workspace@latest nx-test-workspace
Workspace: angular-nest Application Name: ng-nest Default style: SCSS (.scss)cd nx-test-workspace
npx -p @storybook/cli sb init
nx g @nrwl/angular:storybook-configuration ng-nest
which fails with an error "Could not find module “@nrwl/storybook” from “/Users/leifwells/Code/nx-test-workspace”.npm i -D @nrwl/storybook
to avoid the errornx g @nrwl/angular:storybook-configuration ng-nest
which ends with the error “Could not read apps/ng-nest/tsconfig.lib.json”
Context
Please provide any relevant information about your setup:
@nrwl/angular : 8.11.2
@nrwl/cli : 8.11.2
@nrwl/cypress : 8.11.2
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 8.11.2
@nrwl/linter : 8.11.2
@nrwl/nest : 8.11.2
@nrwl/next : Not Found
@nrwl/node : 8.11.2
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 8.11.2
@nrwl/web : Not Found
@nrwl/workspace : 8.11.2
typescript : 3.5.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:17 (2 by maintainers)
Hi, same issue on my side, it feels inappropriate to say that Storybook can only be used for libs… Looking forward to a fix! 👍
At a guess, it should be
tsconfig.app.json
. The root leveltsconfig.json
file is more for project-wide configuration that’s agnostic to whether the inheritor is anapp
or alib
. But since you don’t target Storybook towards a generic ‘everything’ but instead a specific app or lib within a monorepo,tsconfig.app.json
makes more sense to me.