rspack
rspack copied to clipboard
[Bug]: `tsc --skipLibCheck false` reports errors
System Info
System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Max
Memory: 20.53 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.20.4 - ~/.local/state/fnm_multishells/68940_1723172287866/bin/node
Yarn: 3.8.1 - ~/.local/state/fnm_multishells/68940_1723172287866/bin/yarn
npm: 10.7.0 - ~/.local/state/fnm_multishells/68940_1723172287866/bin/npm
bun: 1.1.22 - /opt/homebrew/bin/bun
Browsers:
Chrome: 127.0.6533.100
Safari: 17.5
Details
node_modules/@rspack/core/dist/config/zod.d.ts:5207:37 - error TS2589: Type instantiation is excessively deep and possibly infinite.
5207 export declare const rspackOptions: z.ZodObject<{
~~~~~~~~~~~~~
5208 name: z.ZodOptional<z.ZodString>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
8353 } | undefined;
~~~~~~~~~~~~~~~~~~
8354 }>;
~~
node_modules/@rspack/core/dist/config/zod.d.ts:5207:49 - error TS2344: Type '{ name: z_ZodOptional<ZodString>; dependencies: z_ZodOptional<z_ZodArray<ZodString, "many">>; entry: z_ZodOptional<z_ZodUnion<[z_ZodUnion<...>, z_ZodFunction<...>]>>; ... 26 more ...; performance: z_ZodOptional<...>; }' does not satisfy the constraint 'ZodRawShape'.
Property 'target' is incompatible with index signature.
Type 'z_ZodOptional<z_ZodUnion<[z_ZodUnion<[z_ZodLiteral<false>, z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodUnion<[z_ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", ... 6 more .....' is not assignable to type 'ZodTypeAny'.
The types returned by 'brand(...)' are incompatible between these types.
Type 'ZodBranded<ZodOptional<z_ZodUnion<any>>, any>' is not assignable to type 'ZodBranded<ZodType<any, any, any>, any>'.
Type 'ZodOptional<z_ZodUnion<any>>' is missing the following properties from type 'ZodType<any, any, any>': _type, _output, _input, _def, and 31 more.
5207 export declare const rspackOptions: z.ZodObject<{
~
5208 name: z.ZodOptional<z.ZodString>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
7383 }>, z.ZodLiteral<false>]>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7384 }, "strict", z.ZodTypeAny, {
~
node_modules/@rspack/core/dist/ResolverFactory.d.ts:34:56 - error TS2694: Namespace '"/Users/JounQin/Workspaces/GitHub/backstage/node_modules/@rspack/core/compiled/enhanced-resolve/index"' has no exported member 'Resolver'.
34 type Resolver = import("../compiled/enhanced-resolve").Resolver;
~~~~~~~~
node_modules/@rspack/core/dist/ResolverFactory.d.ts:35:62 - error TS2694: Namespace '"/Users/JounQin/Workspaces/GitHub/backstage/node_modules/@rspack/core/compiled/enhanced-resolve/index"' has no exported member 'ResolveOptions'.
35 type ResolveOptions = import("../compiled/enhanced-resolve").ResolveOptions;
~~~~~~~~~~~~~~
Found 4 errors in 2 files.
Errors Files
2 node_modules/@rspack/core/dist/config/zod.d.ts:5207
2 node_modules/@rspack/core/dist/ResolverFactory.d.ts:34
Reproduce link
https://github.com/backstage/backstage/pull/25953
Reproduce Steps
yarn tsc:full