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
Can't get react-vite-swc example to work - [plugin:vite:react-swc] × failed to invoke plugin on 'Some("/Users/jsimck/Desktop/vite-project-react-swc/src/main.tsx")
#2141
Closed
jsimck opened this issue
Dec 29, 2024
· 2 comments
Describe the bug
I wanted to integrate lingui into my own react vite + swc project, but I seem to have the same issues as with current react example.
When I install dependencies and run the application I got following error (with --debug flag):
VITE v5.4.9 ready in 405 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
vite:html-fallback Rewriting GET / to /index.html +0ms
vite:time 16.31ms /index.html +0ms
vite:resolve 5.53ms /src/main.tsx -> /Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/src/main.tsx +0ms
vite:load 3.05ms [fs] /src/main.tsx +0ms
1:21:25 PM [vite] Pre-transform error: × failed to invoke plugin on 'Some("/Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/src/main.tsx")'
vite:resolve 0.23ms /@vite/client -> /Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/node_modules/vite/dist/client/client.mjs +60ms
vite:load 0.29ms [plugin] /@react-refresh +57ms
vite:import-analysis 1.37ms [0 imports rewritten] /@react-refresh +0ms
vite:transform 4.07ms /@react-refresh +0ms
vite:time 4.70ms /@react-refresh +69ms
vite:load 6.53ms [fs] /src/main.tsx +5ms
vite:load 5.93ms [fs] /@vite/client +1ms
vite:resolve 0.15ms @vite/env -> /Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/node_modules/vite/dist/client/env.mjs +8ms
vite:import-analysis 1.16ms [1 imports rewritten] node_modules/vite/dist/client/client.mjs +3ms
vite:transform 1.51ms /@vite/client +3ms
vite:time 8.29ms /@vite/client +3ms
1:21:25 PM [vite] Internal server error: × failed to invoke plugin on 'Some("/Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/src/main.tsx")'
Plugin: vite:react-swc
File: /Users/jsimck/Desktop/js-lingui/examples/vite-project-react-swc/src/main.tsx
vite:time 11.19ms /src/main.tsx +2ms
vite:load 2.39ms [fs] /node_modules/vite/dist/client/env.mjs +4ms
vite:import-analysis 0.16ms [no imports] node_modules/vite/dist/client/env.mjs +3ms
vite:transform 0.54ms /node_modules/vite/dist/client/env.mjs +3ms
vite:cache [304] /node_modules/vite/dist/client/env.mjs +0ms
vite:time 0.63ms /node_modules/vite/dist/client/env.mjs +24ms
Babel is working fine. I tried scanning through existing issue but couldn't find any recent solution to this issue.
To Reproduce
Just downloaded the react example and only changed dependencies from next versions to latest version 5.
This is an incompatibility between swc_core and version of lingui swc plugin. Please see compatibility section in the plugin's readme. There is also a note in the example's readme that you may have missed.
Describe the bug
I wanted to integrate lingui into my own react vite + swc project, but I seem to have the same issues as with current react example.
When I install dependencies and run the application I got following error (with
--debug
flag):Babel is working fine. I tried scanning through existing issue but couldn't find any recent solution to this issue.
To Reproduce
Just downloaded the react example and only changed dependencies from
next
versions to latest version5
.package.json
Additional context
The babel version works perfectly.
The text was updated successfully, but these errors were encountered: