Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Creating a new React app in E:\Dokuman Visual Code\react.js\project-app.

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

npm ERR! code EBADF
npm ERR! EBADF: bad file descriptor, write

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\FIKCROS\AppData\Local\npm-cache\_logs\2022-04-05T01_02_39_053Z-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... package.json
Deleting project-app/ from E:\Dokuman Visual Code\react.js
Done.
like image 573
Pikarkun Avatar asked Jan 19 '26 17:01

Pikarkun


1 Answers

I had the exact issue. Things that worked to me was: I had changed my terminal for VSCode from Powershell to bash (restarting terminal should help ).

Run the following commands:

  1. Run npm cache clean --force
  2. Then Run npx create-react-app (project name)

Hope this should help you

like image 99
SonamJ Avatar answered Jan 22 '26 06:01

SonamJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!