I have this error wher i try to create react project
$ npx create-react-app my-app
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Program Files\MongoDB\mongosh-2.0.1-win32-x64\bin
npm ERR! path C:\Users\SamCro\Desktop\PRJS\Ang
npm ERR! errno -4058
npm ERR! enoent spawn C:\Program Files\MongoDB\mongosh-2.0.1-win32-x64\bin ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\SamCro\AppData\Local\npm-cache\_logs\2024-02-08T18_44_21_764Z-debug-0.log
I tried to update npm and reinstall Node.js and MongoDB
I suggest you use Vite instead of CRA(create-react-app). These are a few of the following big reasons out of many:
CRA is no longer updated|maintained by the community. React's official docs don't suggest CRA for new projects anymore. CRA's last release.
Vite provides hot-module-reload in the dev env while CRA recompiles the complete build. Saving huge dev hours
Vite uses rollup to bundle the code. Rollup is more efficient than the webpack in optimized bundling.