Error : create-react-app Aborting installation - javascript

according to Reactjs docs :
Youโ€™ll need to have Node >= 8.10 and npm >= 5.6 on your machine. To create a project, run:
npx create-react-app my-app
which my env meet it:
AymanMorsy#DESKTOP-6V4567D MINGW64 /g/reactprojects
$ node --version && npm --version ๐Ÿ‘ˆ๐Ÿ‘ˆ
v12.16.0 ๐Ÿ‘ˆ๐Ÿ‘ˆ
6.13.4 ๐Ÿ‘ˆ๐Ÿ‘ˆ
AymanMorsy#DESKTOP-6V4567D MINGW64 /g/reactprojects
$ npx create-react-app my-app
npx: installed 99 in 17.908s
Creating a new React app in G:\reactprojects\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz
npm ERR! 404
npm ERR! 404 'error-ex#^1.3.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'parse-json'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AymanMorsy\AppData\Roaming\npm-cache\_logs\2020-02-12T21_29_30_123Z-debug.log
Aborting installation. ๐Ÿšจ๐Ÿšจ๐Ÿšจ
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting my-app/ from G:\reactprojects
Done.
I tried solutions on Create React App not installing, showing an error and aborting installation
finally I formated C and installed latest update of windows10 and still see the same problem
edite: output of npm config list
$ npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.13.4 node/v12.16.0 win32 x64"
; builtin config undefined
prefix = "C:\\Users\\AymanMorsy\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = G:\reactprojects
; HOME = C:\Users\AymanMorsy
; "npm config ls -l" to show all defaults.

Looks like https://registry.npmjs.org/error-ex is down for some regions
It will be soon up

solution for this following โคต
Install Scoop
and then install
yarn and then do yarn create-react-app myapp100% work definitely

In my case, antivirus was stopping some of the modules from being accesses. Turned it off, also installed yarn. Works fine
Stop Antivirus momentarily.
npm install -g yarn
yarn global add create-react-app
npx create-react-app my-app
Start Antivirus
Although I feel that yarn is not mandatory to solve this issue in my case - I prefer yarn.
Hoping this helps someone out there.

Related

Cannot use create-react-app as it shows below error

PS D:\Reactjs> npx create-react-app textutils
Creating a new React app in D:\Reactjs\textutils.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/#typescript-eslint%2fscope-manager reason: Invalid response body while trying to fetch https://registry.npmjs.org/#typescript-eslint%2fscope-manager: read ECONNRESET
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ashes10\AppData\Local\npm-cache_logs\2022-08-22T05_43_38_991Z-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 textutils/ from D:\Reactjs
Done.
Maybe this gonna work
npm cache clean --force
Might be because of the cache issue. To fix this, try the below command,
npm cache clean --force
If the issue still persists. Run the below command to install create-react-app,
npm install -g create-react-app
And then, Try creating your react application,
npx create-react-app appname
try to run the command line as administrator
then
cd <your desired location to create the project>
npx create-react-app <project name>

create-react-app Failing to create a new React app in MACos

I have problem using npx create-react-app but i have the pproblem below. I have tried using npm cache clean --force and then npx but the problem persist... Any suggestions?? i have tried using different nodes versions
npx: installed 67 in 4.058s
Creating a new React app in /Users/nestorvargas/Documents/React/myfirstreactapp.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nestorvargas/.npm/_logs/2022-06-26T02_40_25_044Z-debug.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 myfirstreactapp/ from /Users/nestorvargas/Documents/React
Done.

create-react-app aborting with code ENOENT

Just started out with React using an online course from Udemy. For some reason my create-react-app stopped working all of a sudden and it shows this log.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\Vahram\Desktop\Udemy-React\Personal-Notes\Sec5\pokedex-exercise\node_modules\postcss-normalize
npm ERR! dest C:\Users\Vahram\Desktop\Udemy-React\Personal-Notes\Sec5\pokedex-exercise\node_modules\.postcss-normalize.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Vahram\Desktop\Udemy-React\Personal-Notes\Sec5\pokedex-exercise\node_modules\postcss-normalize' -> 'C:\Users\Vahram\Desktop\Udemy-React\Personal-Notes\Sec5\pokedex-exercise\node_modules\.postcss-normalize.DELETE'
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:
npm ERR! C:\Users\Vahram\AppData\Roaming\npm-cache\_logs\2021-05-06T21_38_53_463Z-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 pokedex-exercise/ from C:\Users\Vahram\Desktop\Udemy-React\Personal-Notes\Sec5
Done.
I checked out similar questions on here and there were some solutions I tried. The usual answer is to delete package.json but I don't have that seeing as I'm trying to make a new React app. Here's what I've tried so far:
Originally tried npx create-react-app my_app
Then tried running npm install -g create-react-app and then create-react-app my_app.
Then tried npm cache clean --force followed by npm rebuild then step 2 again.
Then tried npm init --yes to generate a package.json file, followed by trying to make a new app again using CRA.
Tried restarting the machine
Curious thing I noticed that I'm not sure is related to the issue:
When I go to Task Manager, there are two Node.js processes running. When I try to end one, it spawns another Node.js process... I can't get rid of all Node.js processes. This is why I originally restarted the machine.
Any help is appreciated! I have no idea how to proceed... I'm even thinking of formatting my machine and starting everything from scratch. However, I'd like to know why this happens so that I can avoid it in the future.
I just solved this using the following command.
npm uninstall -g create-react-app
and then:
npm install -g create-react-app
Regards

create-react-app ERR! 404 Object Not Found

I'm trying to run create-react-app (npx create-react-app fetching-images), it loads for a while then I get this error every time:
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code E404
npm ERR! 404 Object Not Found - GET https://skimdb.npmjs.com/registry/cyclist/-/cyclist-1.0.1.tgz - not_found
npm ERR! 404
npm ERR! 404 'cyclist#https://skimdb.npmjs.com/registry/cyclist/-/cyclist-1.0.1.tgz' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Eric/.npm/_logs/2021-03-14T10_02_15_171Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
I completely uninstalled node, npm and npx, and then reinstalled the newest version from https://nodejs.org/en/ but still get the this error. I'm on macOS(v.11.2.2), npm v.7.6.0, node v.15.11.0.
How do I fix this error?
Please try setting this:
npm config set registry http://registry.npmjs.org

i'm having issues creating my React app using npx-create-reat-app

$ npx create-react-app robot
npx: installed 67 in 583.936s
Creating a new React app in C:\Users\User\ReactApps\robot.
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! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz failed, reason: socket hang up
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:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2021-01-21T18_37_39_680Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting robot/ from C:\Users\User\ReactApps
Done.
Check this one hope you create react app
1 check your nodejs version
node -v
2 check your npm version
npm -v
3.you globally installed your react app
4.Go terminal and root path
npx create-react-app appname
Uninstall the [nodejs] (https://nodejs.org/en/download/)!
Install it again
it works I have tried it.

Categories