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.

After upgrade to 13.x storybook fails to compile

See original GitHub issue

Current Behavior

running nx storybook <project> errors in compilation with following error:

Error: C:\code\upgrade\upgradetest\apps\myapp\src\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at C:\code\upgrade\upgradetest\node_modules\@ngtools\webpack\src\ivy\loader.js:60:26
    at processResult (C:\code\upgrade\upgradetest\node_modules\webpack\lib\NormalModule.js:751:19)
    at C:\code\upgrade\upgradetest\node_modules\webpack\lib\NormalModule.js:853:5
    at C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:399:11
    at C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:251:18
    at context.callback (C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at C:\code\upgrade\upgradetest\node_modules\@ngtools\webpack\src\ivy\loader.js:60:17

Expected Behavior

It should compile

Steps to Reproduce

This can be reproduced by generating a new workspace with angular as the framework. I then created a library and ran storybook configuration command. I selected no when asked to create an e2e app. Then I just run nx storybook <projectname>

Failure Logs

Error: C:\code\upgrade\upgradetest\apps\myapp\src\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at C:\code\upgrade\upgradetest\node_modules\@ngtools\webpack\src\ivy\loader.js:60:26
    at processResult (C:\code\upgrade\upgradetest\node_modules\webpack\lib\NormalModule.js:751:19)
    at C:\code\upgrade\upgradetest\node_modules\webpack\lib\NormalModule.js:853:5
    at C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:399:11
    at C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:251:18
    at context.callback (C:\code\upgrade\upgradetest\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at C:\code\upgrade\upgradetest\node_modules\@ngtools\webpack\src\ivy\loader.js:60:17

Environment

Node : 14.17.0 OS : win32 x64 npm : 6.14.13

nx : 13.4.5 @nrwl/angular : 13.4.5 @nrwl/cli : 13.4.5 @nrwl/cypress : 13.4.5 @nrwl/devkit : 13.4.5 @nrwl/eslint-plugin-nx : 13.4.5 @nrwl/express : undefined @nrwl/jest : 13.4.5 @nrwl/linter : 13.4.5 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : undefined @nrwl/nx-cloud : undefined @nrwl/react : undefined @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/tao : 13.4.5 @nrwl/web : undefined @nrwl/workspace : 13.4.5 @nrwl/storybook : 13.4.5 @nrwl/gatsby : undefined typescript : 4.4.4 rxjs : 7.4.0

Community plugins: @angular/animations: 13.1.2 @angular/common: 13.1.2 @angular/compiler: 13.1.2 @angular/core: 13.1.2 @angular/forms: 13.1.2 @angular/platform-browser: 13.1.2 @angular/platform-browser-dynamic: 13.1.2 @angular/router: 13.1.2 @angular-devkit/build-angular: 13.1.3 @angular/cli: 13.1.3 @angular/compiler-cli: 13.1.2 @angular/language-service: 13.1.2 @storybook/angular: 6.4.13

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jasedwardscommented, Jan 18, 2022

following this comment fixes the issue

0reactions
mandarinicommented, Feb 21, 2022

New docs for styles and stylePreprocessorOptions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook - Can't resolve 'generated-stories-entry.cjs' / Field ...
js application and running build-storybook I am receiving the following error. Note: I am using npm version 8.19.1 . The project is written...
Read more >
Install Storybook
Install the required dependencies. · Setup the necessary scripts to run and build Storybook. · Add the default Storybook configuration. · Add some ......
Read more >
@storybook/builder-webpack5 - npm
Builder-Webpack5. Builder implemented with webpack5 and webpack5 -compatible loaders/plugins/config, used by @storybook/core-server to build ...
Read more >
React Storybook deploy fails during Webpack build - Support
Hey everyone :wave: I'm trying to deploy my React Storybook (project here: ... what I get locally after cloning, npm install , and...
Read more >
Blog - Next.js 13
Next.js 13 introduces layouts, React Server Components, and streaming in the app directory, ... Update today by running:
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