question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storybook Install: "Could not read apps/ng-nest/tsconfig.lib.json"

See original GitHub issue

Prerequisites

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.

  1. npx create-nx-workspace@latest nx-test-workspace Workspace: angular-nest Application Name: ng-nest Default style: SCSS (.scss)
  2. cd nx-test-workspace
  3. npx -p @storybook/cli sb init
  4. 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”.
  5. npm i -D @nrwl/storybook to avoid the error
  6. nx 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:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
acostlabcommented, Mar 1, 2020

Hi, same issue on my side, it feels inappropriate to say that Storybook can only be used for libs… Looking forward to a fix! 👍

2reactions
PizzapunkDevcommented, Jun 21, 2020

@FrozenPandaz Should it be tsconfig.json or tsconfig.app.json for projectType: 'application'?

I have the same issue in my project, and we have following structure

<workspace_name>
  apps/
    <project_name>
      src/
        tsconfig.app.json
      tsconfig.json

So it’s the same as in documentation

When I changed in the schematics configuration file /tsconfig.lib.json to /tsconfig.json it starts to work properly.

So I assume for application type of project it should be /tsconfig.json - Can someone confirm, that I’m thinking right, please?

At a guess, it should be tsconfig.app.json. The root level tsconfig.json file is more for project-wide configuration that’s agnostic to whether the inheritor is an app or a lib. 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Storybook
Configure Storybook. Storybook is configured via a folder called .storybook , which contains various configuration files. Note that you can change the folder ......
Read more >
storybook/addon-docs
Start using @storybook/addon-docs in your project by running `npm i ... may or may not need this line depending on your app's setup...
Read more >
Next-level component showcasing with Storybook controls
Although it's not part of Storybook controls, I would like to say a few words about the structure of the story. As you...
Read more >
Storybook - no stories showing up in typescript project with ...
Unfortunately I couldn't see where is your esri package listed in package.json . Did you miss install it? – tmhao2005. Nov 15, 2020...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found