Unable to create React app using npx create-react-app@ my-app

89 Views Asked by At

I am getting the following error. I updated Node and npm. I turned off Proxy Setup. I attempted to create an app with Vite and Parcel, but both are not working.

Creating a new React app in D:\MERS\NextJS\youtube.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ECONNRESET
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in: C:\Users\MANU\AppData\Local\npm-cache\_logs\2024-03-11T00_39_53_976Z-debug-0.log

Aborting installation.
  npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting youtube/ from D:\MERS\NextJS
node:fs:1216
  binding.rmdir(pathModule.toNamespacedPath(path));
          ^

Error: EBUSY: resource busy or locked, rmdir 'D:\MERS\NextJS\youtube'
    at rmdirSync (node:fs:1216:11)
    at _rmdirSync (node:internal/fs/rimraf:235:5)
    at rimrafSync (node:internal/fs/rimraf:193:7)
    at Object.rmSync (node:fs:1265:10)
    at Object.removeSync (C:\Users\MANU\AppData\Local\npm-cache\_npx\9cf80dab71d476d3\node_modules\fs-extra\lib\remove\index.js:15:28)
    at C:\Users\MANU\AppData\Local\npm-cache\_npx\9cf80dab71d476d3\node_modules\create-react-app\createReactApp.js:539:14
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'rmdir',
  path: 'D:\\MERS\\NextJS\\youtube'
}

Node.js v21.7.1

See the screenshot

1

There are 1 best solutions below

0
David Hype On

From the error message, it seems your internet connection is not fast, or jist a bit faulty. How about you retry usinh another internet connection?