hilla
hilla copied to clipboard
Version conflict in tapable with Flow 9 alpha 4
Description of the bug / feature
A dependency to [email protected]
has been introduced. This depends on [email protected]
.
Flow also uses [email protected]
which depends on tabale@^1.1
.
While this combination seems to work fine in a basic project, at least the Start project fails to build
`node_modules/@types/webpack/index.d.ts(32,3): error TS2305: Module '"tapable"' has no exported member 'Tapable'.\n` +
"node_modules/@types/webpack/index.d.ts(1073,23): error TS2707: Generic type 'SyncWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1074,22): error TS2707: Generic type 'SyncWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1075,28): error TS2707: Generic type 'AsyncSeriesWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1076,27): error TS2707: Generic type 'AsyncSeriesWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1077,27): error TS2707: Generic type 'SyncBailHook<T, R, AdditionalOptions>' requires between 2 and 3 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1078,21): error TS2707: Generic type 'SyncWaterfallHook<T, AdditionalOptions>' requires between 1 and 2 type arguments.\n" +
"node_modules/@types/webpack/index.d.ts(1079,27): error TS2314: Generic type 'HookMap<H>' requires 1 type argument(s).\n" +
...
It is not the webpack build that fails but compilation of some util TS files used in the project.
Workaround
npm i tapable@^1.1 --save-dev
installs tapable
1.x in the root of the project instead of 2.x that otherwise gets installed. This makes the project work
Minimal reproducible example
The Start project after removing the explicit tapable
1.x dependency. Could not reproduce in a starter project.
Expected behavior
Only one version is used. Currently esbuild-loader
depends on tapable 2.x and webpack 4 + plugins depend on tapable 1.x
Versions:
- Vaadin / Flow version: 9 alpha 4
Please consider using "skipLibCheck"
option in tsconfig.json
to get rid of the error.
Maybe another option is to downgrade the version of esbuild-loader
that uses a compatible version of tabale@^1.1
.
If not possible, then maybe revert back to ts-loader
?
Using skipLibCheck
could be risky, there might be runtime errors.
Is this still actual? Does anyone encounter this in projects other than Start?
It is not relevant for Vite at least