It might related to node version either you can run npm install svelte@^4.0.0 or npm install --legacy-peer-deps finally you can check via running this rm -rf node_modules package-lock.json npm cache clean --force npm install
npm install svelte@^4.0.0
npm install --legacy-peer-deps
rm -rf node_modules package-lock.json npm cache clean --force npm install