Closed alanko0511 closed 8 months ago
I just cloned this repo on my local machine, and I can successfully create a deno + react + ts + swc project with the correct. I also found that the create-vite-extra
downloaded is still 1.1.0
.
Found the issue... I used this tool before, and somehow deno doesn't check and download the latest version, so it uses the version it cached back then.
Specifying the version or not including the version number fixes the issue:
deno run --allow-read --allow-write --allow-env npm:create-vite-extra
I'm using Deno to create a React.js + TS + SWC Vite project, but in the generated
vite.config.mts
file, it wants a SWC version that doesn't exist today. (the latest version is3.5.0
, but it wants^4.0.0
)I have to manually change to
^3.5.0
to get this working.To produce this:
deno run --allow-read --allow-write --allow-env npm:create-vite-extra@latest
Select a template: › deno-react
Select a variant: › TypeScript + SWC
deno task dev
TypeError: Could not find npm package '@vitejs/plugin-react-swc' matching '^4.0.0'.
My setup: