Closed louishugens closed 2 years ago
Thanks for reporting!
What is the version of Next.js?
I was also getting that error on version 12.2.1-canary.1. Upgraded to 12.2.5 and now it works. Thanks!
@louishugens Try to upgrade your Next.js version to latest as @felipeptcho said.
SWC seems to be fixing some bugs by changing its internal APIs, and it also affects to the plugin system of Next.js.
So keep your Next.js version to be newest to avoid troublesome errors like you met.
It is working fine after upgrading to version next@12.2.5. Thanks @orionmiz and @felipeptcho.
Describe the bug
Hi Guys,
First of all thanks for this plugin. It will be really useful. But after installing the plugin and configure i couldn't launch the project with yarn dev. See below the output from yarn dev
warn - You have enabled experimental feature (swcPlugins) in next.config.js. warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
thread 'thread 'thread '' panicked at '' panicked at 'failed to invoke plugin: failed to invoke C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:' panicked at '::21214212failed to invoke plugin: failed to invoke ' panicked at 'failed to invoke plugin: failed to invoke
C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm' panicked at 'failed to invoke plugin: failed to invokeC:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node-plugin\next_superjson.wasmgin\next_superjson.wasm Caused by:invoke plugin: failed to invokeC:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_mod 0: Failed to create plugin instanceon.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjsonCaused by: 1: Error while importing "env"."get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }) 0: Failed to create plugin instance', 0: Failed to create plugin instanceC:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }) 1: Error while importing "env"."get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }):t', hread '', 212C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rsC:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_n14t\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm : : note: run withRUST_BACKTRACE=1
environment variable to display a backtraceCaused by: 0: Failed to create plugin instance 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })14', C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:212:14 thread 'C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasmCaused by: 0: Failed to create plugin instance 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })', C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:212:14 thread 'thread '' panicked at '' panicked at 'failed to invoke plugin: failed to invoke
C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasmfailed to invoke plugin: failed to invokeC:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm
as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasmCaused by:Caused by: 0: Failed to create plugin instance 0: Failed to create plugin instancethread '