Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx create-react-app #13562

Open
dinesh22js opened this issue Apr 15, 2024 · 9 comments
Open

npx create-react-app #13562

dinesh22js opened this issue Apr 15, 2024 · 9 comments

Comments

@dinesh22js
Copy link

npx create-react-app This command is working very slowly Give me any Solution this problem

@nembenike
Copy link

use vite

@tejaswi-devalla
Copy link

Have you tried running it on wsl2?
If you did and the issue still persists try updating your create-react-app package (or) delete it and reinstall it globally.
Reinstall npm, and node

@pefka
Copy link

pefka commented Apr 30, 2024

Reinstall npm, and node

Horror, advice like “reinstall windows”

@niranjan404
Copy link

npx create-react-app This command is working very slowly Give me any Solution this problem

Change to vite; npx is not an faster one, tbh

https://www.linkedin.com/pulse/exploring-npx-create-react-app-vs-vite-choosing-right-amitha-h-hp4yf/
https://v3.vitejs.dev/guide/

@niranjan404
Copy link

niranjan404 commented Apr 30, 2024

Have you tried running it on wsl2? If you did and the issue still persists try updating your create-react-app package (or) delete it and reinstall it globally. Reinstall npm, and node

Reinstalling won't solve this, npx cra is slow af since it uses webpack, and bundles the application before it makes ready to listen.

@pefka
Copy link

pefka commented Apr 30, 2024

Change to vite; npx is not an faster one, tbh

There is no benchmark in your link, how much faster is 1%? by 2% by 10? some facts are needed, confirmed

I waited about 6 minutes and the installation went through npx, it just took a long time, but it was completed successfully

@niranjan404
Copy link

niranjan404 commented Apr 30, 2024

Change to vite; npx is not an faster one, tbh

There is no benchmark in your link, how much faster is 1%? by 2% by 10? some facts are needed, confirmed

I waited about 6 minutes and the installation went through npx, it just took a long time, but it was completed successfully

Simply speaking, vite is quicker because it uses module preloading to achieve a faster build.

Read on to better understand with graphs: https://kinsta.com/blog/vite-vs-webpack/. More thorough explanations can be obtained.

Trust me, I was using npx cra Then, after switching to vite, production build and deploy times rose, as I saw.

@pefka
Copy link

pefka commented Apr 30, 2024

Change to vite; npx is not an faster one, tbh

there is a link to compare VITE with WEBPACK, and we are talking about npx (NPX stands for Node Package eXecute. It is simply an NPM package runner)

@niranjan404
Copy link

niranjan404 commented Apr 30, 2024

Change to vite; npx is not an faster one, tbh

there is a link to compare VITE with WEBPACK, and we are talking about npx (NPX stands for Node Package eXecute. It is simply an NPM package runner)

Well, I indeed know what npx is, since cra (create-react-app) uses webpack and NPX (Node package eXecute) runs the cra to initiate the app, it is mentioned as WEBPACK, basically it means the NPX.

If you wish, you can just initiate two new apps using vite and npx and watch which one builds quicker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants