You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript throws error on plugins: [vuePlugin()].
In my opinion, It is caused by mismatching files in the plugin esbuild-plugin-vue3/node_modules/esbuild/lib/main.d.ts (esbuild-plugin-vue3@0.3.1)
and in esbuild esbuild/lib/main.d.ts (esbuild@0.17.0)
When I replace the content of the first file, the problem goes away.
The log:
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
config/build/esbuild-config.ts:24:13 - error TS2322: Type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").Plugin'.
Types of property 'setup' are incompatible.
Type '(build: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>' is not assignable to type '(build: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>'.
Types of parameters 'build' and 'build' are incompatible.
Type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").PluginBuild' is not assignable to type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").PluginBuild'.
The types of 'initialOptions.loader' are incompatible between these types.
Type '{ [ext: string]: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").Loader; } | undefined' is not assignable to type '{ [ext: string]: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").Loader; } | undefined'.
Type '{ [ext: string]: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").Loader; }' is not assignable to type '{ [ext: string]: import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").Loader; }'.
'string' index signatures are incompatible.
Type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild/lib/main").Loader' is not assignable to type 'import("/home/stas/work/test/js/js_builder_test_1/node_modules/esbuild-plugin-vue3/node_modules/esbuild/lib/main").Loader'.
Type '"empty"' is not assignable to type 'Loader'.
24 plugins: [vuePlugin()]
The text was updated successfully, but these errors were encountered:
Hello,
TypeScript throws error on
plugins: [vuePlugin()]
.In my opinion, It is caused by mismatching files in the plugin
esbuild-plugin-vue3/node_modules/esbuild/lib/main.d.ts
(esbuild-plugin-vue3@0.3.1)and in esbuild
esbuild/lib/main.d.ts
(esbuild@0.17.0)When I replace the content of the first file, the problem goes away.
The log:
The text was updated successfully, but these errors were encountered: