vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
830 stars 54 forks source link

Can't install package #211

Closed miroirstudiosrl closed 4 months ago

miroirstudiosrl commented 4 months ago

When I try to install the package using yarn (v2) I get the following error: Error: @swc/types@workspace:^: Workspace not found (@swc/types@workspace:^)

Things I alreay tried:

DiFuks commented 4 months ago

I have a similar problem - tried different versions of yarn, clearing the cache, installing @swc/core, creating a project from scratch.

ArnaudBarre commented 4 months ago

Other people are saying v1.5.7 is fine and v1.5.11 was the issue

DiFuks commented 4 months ago

Indeed, this workaround works for me:

"resolutions": {
  "@swc/core": "1.5.7"
},
"devDependencies": {
  "@vitejs/plugin-react-swc": "3.7.0"
}
miroirstudiosrl commented 4 months ago

Other people are saying v1.5.7 is fine and v1.5.11 was the issue

Yep I've read the issue in the swc repo but nothing I tried has worked

miroirstudiosrl commented 4 months ago

Indeed, this workaround works for me:

"resolutions": {
  "@swc/core": "1.5.7"
},
"devDependencies": {
  "@vitejs/plugin-react-swc": "3.7.0"
}

Thanks this works 💪