profile
viewpoint

Ask questionsLatest version of Angular installs tapable 2.2.0 which conflicts with storybook 1.1.3 requirement

Describe the bug After installing storybook into a clean angular 11.0.4 project, tapable throws a number of errors while compiling typescript.

To Reproduce

  1. Create a fresh Angular 11.0.4 project.
  2. Init storybook.
  3. Run tsc.

Expected behavior tsc compiles without errors

Screenshots

Code snippets results:

node_modules/@types/webpack/index.d.ts:32:3 - error TS2305: Module '"../../tapable/tapable"' has no exported member 'Tapable'.

32   Tapable,
     ~~~~~~~

node_modules/@types/webpack/index.d.ts:1062:23 - error TS2707: Generic type 'SyncWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.

1062             resolver: SyncWaterfallHook;
                           ~~~~~~~~~~~~~~~~~

and many more

System

Environment Info:

  System:
    OS: macOS 11.0.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.15.0/bin/yarn
    npm: 6.14.9 - ~/.nvm/versions/node/v12.15.0/bin/npm
  Browsers:
    Chrome: 87.0.4280.88
    Edge: 87.0.664.60
    Firefox: 80.0.1
    Safari: 14.0.1
  npmPackages:
    @storybook/addon-actions: ^6.1.11 => 6.1.11 
    @storybook/addon-essentials: ^6.1.11 => 6.1.11 
    @storybook/addon-links: ^6.1.11 => 6.1.11 
    @storybook/angular: ^6.1.11 => 6.1.11 

Additional context

I was able to resolve by forcing tsc 1.1.3, but unfortunately that will likely cause issues with angular dev kit which transiently requires 2.2.0.

angular-to-do@0.0.0
├─┬ @angular-devkit/build-angular@0.1100.4
│ ├─┬ @ngtools/webpack@11.0.4
│ │ └─┬ enhanced-resolve@5.3.1
│ │   └── tapable@2.2.0 
│ └─┬ webpack@4.44.2
│   ├─┬ enhanced-resolve@4.3.0
│   │ └── tapable@1.1.3  deduped
│   └── tapable@1.1.3 
└─┬ @storybook/angular@6.1.11
  ├─┬ @storybook/core@6.1.11
  │ ├─┬ html-webpack-plugin@4.5.0
  │ │ └── tapable@1.1.3 
  │ └─┬ react-dev-utils@10.2.1
  │   └─┬ fork-ts-checker-webpack-plugin@3.1.1
  │     └── tapable@1.1.3 
  ├─┬ fork-ts-checker-webpack-plugin@4.1.6
  │ └── tapable@1.1.3 
  ├─┬ ts-loader@6.2.2
  │ └─┬ enhanced-resolve@4.3.0
  │   └── tapable@1.1.3 
  └─┬ tsconfig-paths-webpack-plugin@3.3.0
    └─┬ enhanced-resolve@4.3.0
      └── tapable@1.1.3 
storybookjs/storybook

Answer questions github-actions[bot]

Automention: Hey @Marklb @MaximSagan @kroeder @ndelangen, you've been tagged! Can you give a hand here?

useful!
source:https://uonfu.com/
Github User Rank List