Any plugin I compile breaks Next js / Error while importing "__wbindgen_placeholder__"."__wbindgen_describe": unknown import. Expected Function(FunctionType { params: [I32], results: [] }) #7361
-
Describe the bugI don't know what has changed. My plugin worked well. I created backups of my development. Now any plugin I compiled breaks next js. Any plugin that I compile on my computer breaks next js. The plugins that I compiled the day before yesterday work well. I completely reinstalled Cargo and Rust. Reinstalled swc_cli and swc_core. It did not help. I really need help. Full text of the error:
I installed cargo console_error_panic_hook:
i setting - RUST_BACKTRACE=1, RUST_LOG=trace, SWC_DEBUG=1
This error is printed to the console many times Input codeswc plugin new --target-type wasm32-wasi my-first-plugin ConfigNo response Playground linkNo response Expected behaviorNext js doesn't break. Actual behaviorThere are no errors during compilation. But any plugin I compile breaks Next js. The plugins I compiled earlier do not break Next js. Versionswc_cli: latest, swc_core: latest, cargo: latest, rust:latest Additional contextI don't have any other dependencies. I removed everything and installed only the latest swc. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I have a similar problem with my WebAssembly plugin. I get:
I already spent (too) many hours on this. I am using the Rust Toolchain |
Beta Was this translation helpful? Give feedback.
-
I observed that plugins that work well (for example, the Istanbul Coverage Plugin) have a considerably smaller wasm interface when inspecting it with
while my plugin has all the bindgen exports (and imports). I have not yet understood why this is the case. |
Beta Was this translation helpful? Give feedback.
-
The problem was that I had dependencies in my |
Beta Was this translation helpful? Give feedback.
The problem was that I had dependencies in my
Cargo.toml
that also added WASM import/exports without being used for the functionality on the interface to SWC. Removing the dependency solved to problem.