Thursday, November 4, 2021

Problem Solve React - Aborting installation.- npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

react app problem : Aborting installation.

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

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


Error That show : 

Nowshad@DESKTOP-KKVJVE3 MINGW64 /e/WEB Larning File/React/use firebase contex api login (master)

$ npx create-react-app my-app

npx: installed 67 in 11.376s


Creating a new React app in E:\WEB Larning File\React\use firebase contex api login\my-app.


Installing packages. This might take a couple of minutes.

Installing react, react-dom, and react-scripts with cra-template...



> coa@2.1.3 preinstall E:\WEB Larning File\React\use firebase contex api login\my-app\node_modules\coa

> start /B node compile.js & node compile.js


internal/modules/cjs/loader.js:905

  throw err;

  ^


Error: Cannot find module 'E:\WEB Larning File\React\use firebase contex api login\my-app\node_modules\coa\compile.js'

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)

    at Function.Module._load (internal/modules/cjs/loader.js:746:27)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)

    at internal/main/run_main_module.js:17:47 {

  code: 'MODULE_NOT_FOUND',

  requireStack: []

}

internal/modules/cjs/loader.js:905

  throw err;

  ^


Error: Cannot find module 'E:\WEB Larning File\React\use firebase contex api login\my-app\node_modules\coa\compile.js'

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)

    at Function.Module._load (internal/modules/cjs/loader.js:746:27)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)

    at internal/main/run_main_module.js:17:47 {

  code: 'MODULE_NOT_FOUND',

  requireStack: []

}

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! coa@2.1.3 preinstall: `start /B node compile.js & node compile.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the coa@2.1.3 preinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\Nowshad\AppData\Roaming\npm-cache\_logs\2021-11-04T14_02_38_150Z-debug.log


Aborting installation.

  npm install --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 my-app/ from E:\WEB Larning File\React\use firebase contex api login

Done.

Solve 


1 . This problem Happens for the react router dom  . recently react router dom published new version. NPM Packages  

2 . RUN THIS Comment : npm cache clean --force

3 . Then RUN : npm i react-router-dom

4 . Then Try : npx create-react-app demo-app