Code in Terminal for React app creation stuck in loop #151670
Replies: 4 comments 4 replies
-
Hello, you can try 1. Clear Your NPM CacheSometimes, dependency conflicts arise from cached versions of packages. Run: npm cache clean --force Then, delete your rm -rf node_modules package-lock.json # macOS/Linux
rd /s /q node_modules package-lock.json # Windows PowerShell 2. Use a Clean Vite InstallationInstead of repeatedly running Create a Fresh Vite React Projectnpm create vite@latest my-project -- --template react
cd my-project
npm install After this, check if running 3. Manually Update Problematic DependenciesInstead of using Upgrade Vite & PostCSSnpm i vite@latest postcss@latest Upgrade Other Vulnerable DependenciesCheck if specific packages are outdated and update them: npm outdated
npm update 4. Switch to Yarn or PNPM (If Issues Persist)If NPM keeps causing dependency problems, try an alternative package manager: Using Yarn: corepack enable
yarn create vite my-project --template react
cd my-project
yarn install Using PNPM: npm i -g pnpm
pnpm create vite my-project --template react
cd my-project
pnpm install Final CheckRun: npm audit |
Beta Was this translation helpful? Give feedback.
-
Hey! It sounds like you're running into dependency version conflicts while setting up your React project with Vite and SASS. No worries this is a common issue in JavaScript projects! Here are a few steps to try and resolve it: 1️⃣ Start Fresh – Clear EverythingFirst, completely remove your rm -rf node_modules package-lock.json or on Windows: rd /s /q node_modules & del package-lock.json Then, reinstall dependencies: npm install 2️⃣ Avoid
|
Beta Was this translation helpful? Give feedback.
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
yyle88@yyle88deMacBook-Pro vuedemo % npm audit
yyle88@yyle88deMacBook-Pro vuedemo % |
Beta Was this translation helpful? Give feedback.
-
Solution to Force Vite to Use [email protected]when update [email protected] to [email protected] The issue is that Vite is still using [email protected] internally, even though you've installed [email protected] globally. Since Vite defines [email protected] as a dependency, npm installs it inside node_modules Update esbuild npm install vite esbuild@latest Open "esbuild": "^0.24.0" or "esbuild": "^0.25.0", Now, add the override inside "overrides": {
"esbuild": "0.25.0"
}, Save the file and npm install After updating, check that all instances of esbuild are using the correct version: npm ls esbuild 🚨 After updating and getting the version it can be found Should-be └─┬ vite@<your version>
└── [email protected] 🚨 This is a temporary solution until Vite updates its dependencies and after get solution: 1️⃣ Remove 2️⃣ Run:
I wish you success ☺
|
Beta Was this translation helpful? Give feedback.
-
Body
Hello, I am currently halfway in a 3 month software development program and having the following problem when trying to work in React: I tried to install SASS into my project after initially installing Vite & creating a React App successfully and I got the below error. I was unable to troubleshoot this and decided to recreate my repository and project from scratch to hopefully correct this. Now when I try to install a new Vite project it alternates between 45 vulnerabilities and 2 vulnerabilities each time I run npm audit fix --force after running npm install for the React Vite process.
45 Vulnerabilities gives the following error in my VS Code Terminal:
2 vulnerabilities gives this error:
Please advise me ASAP on how to correct this, I am working on a Windows 11 system setup and I believe everything on my system is up to date. I have been stumped on this for a few hours and tried to look online for help but no clear solutions have been found.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions