Closed moishinetzer closed 9 months ago
could u post the error or screenshot here ?
It's a pretty long call stack but here you go:
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Plugin'.
Types of property 'setup' are incompatible.
Type '(build: import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>' is not assignable to type '(build: import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>'.
Types of parameters 'build' and 'build' are incompatible.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").PluginBuild' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").PluginBuild'.
The types of 'initialOptions.plugins' are incompatible between these types.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Plugin[] | undefined' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Plugin[] | undefined'.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Plugin[]' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Plugin[]'.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Plugin'.
Types of property 'setup' are incompatible.
Type '(build: import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>' is not assignable to type '(build: import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>'.
Types of parameters 'build' and 'build' are incompatible.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").PluginBuild' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").PluginBuild'.
Types of property 'onEnd' are incompatible.
Type '(callback: (result: import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildResult) => void | Promise<void>) => void' is not assignable to type '(callback: (result: import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildResult) => void | Promise<void>) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'result' and 'result' are incompatible.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildResult' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildResult'.
Types of property 'rebuild' are incompatible.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildInvalidate | undefined' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildInvalidate | undefined'.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildInvalidate' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildInvalidate'.
Type 'Promise<import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildIncremental>' is not assignable to type 'Promise<import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildIncremental>'.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").BuildIncremental' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").BuildIncremental'.
Types of property 'metafile' are incompatible.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Metafile | undefined' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Metafile | undefined'.
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Metafile' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Metafile'.
Types of property 'outputs' are incompatible.
Type '{ [path: string]: { bytes: number; inputs: { [path: string]: { bytesInOutput: number; }; }; imports: { path: string; kind: ImportKind | "file-loader"; external?: boolean | undefined; }[]; exports: string[]; entryPoint?: string | undefined; cssBundle?: string | undefined; }; }' is not assignable to type '{ [path: string]: { bytes: number; inputs: { [path: string]: { bytesInOutput: number; }; }; imports: { path: string; kind: ImportKind; }[]; exports: string[]; entryPoint?: string | undefined; cssBundle?: string | undefined; }; }'.
'string' index signatures are incompatible.
Type '{ bytes: number; inputs: { [path: string]: { bytesInOutput: number; }; }; imports: { path: string; kind: ImportKind | "file-loader"; external?: boolean | undefined; }[]; exports: string[]; entryPoint?: string | undefined; cssBundle?: string | undefined; }' is not assignable to type '{ bytes: number; inputs: { [path: string]: { bytesInOutput: number; }; }; imports: { path: string; kind: ImportKind; }[]; exports: string[]; entryPoint?: string | undefined; cssBundle?: string | undefined; }'.
Types of property 'imports' are incompatible.
Type '{ path: string; kind: ImportKind | "file-loader"; external?: boolean | undefined; }[]' is not assignable to type '{ path: string; kind: ImportKind; }[]'.
Type '{ path: string; kind: ImportKind | "file-loader"; external?: boolean | undefined; }' is not assignable to type '{ path: string; kind: ImportKind; }'.
Types of property 'kind' are incompatible.
Type 'ImportKind | "file-loader"' is not assignable to type 'ImportKind'.
Type '"file-loader"' is not assignable to type 'ImportKind'.ts(2322)
it seems that you have 2 different versions of esbuild installed, try to resolve them to 1 version(if you're using yarn then you could add a resolution item to your package.json )
发件人: Moishi Netzer @.> 发送时间: Friday, February 3, 2023 7:11:00 PM 收件人: indooorsman/esbuild-css-modules-plugin @.> 抄送: indooorsman @.>; Comment @.> 主题: Re: [indooorsman/esbuild-css-modules-plugin] Incompatibility with tsup (Issue #48)
It's a pretty long call stack but here you go:
Type 'import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("c:/Users/moish/Documents/Repos/Pbandj/playground/node_modules/esbuild/lib/main").Plugin'.
Types of property 'setup' are incompatible.
Type '(build: import("c:/Users/moish/Documents/Repos/Pbandj/node_modules/esbuild/lib/main").PluginBuild) => void | Promise
― Reply to this email directly, view it on GitHubhttps://github.com/indooorsman/esbuild-css-modules-plugin/issues/48#issuecomment-1415723024, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABFRA3P65O624QI6BOA2DU3WVTRUJANCNFSM6AAAAAAUPOUBKQ. You are receiving this because you commented.Message ID: @.***>
closed as no feedback for long time
For some reason typescript really hates this, do you know why this is happening? I believe that it still works correctly, it seems that one of the type definitions aren't the same as what tsup has.