Меню

Npx create react app my app ошибка

I am trying to use npx create-react app but i have errors that is shown below:

npm ERR! Unexpected end of Json input while parsing near
'...eact-app/-/create-rea'

npm ERR! A complete log of this run can be found in: npm ERR!
C:UsersdpAppDataRoamingnpm-cache_logs2018-12-06T18-42-56-293Z-debug.log

Install for create-react-app@latest failed with code 1** 

and the log file of the error is here…!

How I can get rid of this trouble??

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe',

1 verbose cli   
'C:\Users\dp\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',

1 verbose cli   'install',

1 verbose cli   'create-react-app@latest',

1 verbose cli   '--global',

1 verbose cli   '--prefix',

1 verbose cli  
'C:\Users\dp\AppData\Roaming\npm-cache\_npx\3588',

1 verbose cli   '--loglevel',

1 verbose cli   'error',

1 verbose cli   '--json' ]

2 info using npm@6.4.1

3 info using node@v10.13.0

4 verbose npm-session 7862701600d4f4ce

5 silly install loadCurrentTree

6 silly install readGlobalPackageData

7 http fetch GET 304 

https://registry.npmjs.org/create-react-app 872ms (from cache)

8 silly fetchPackageMetaData error for create-react-app@latest
Unexpected end of JSON input while parsing near
'...eact-app/-/create-rea'

9 timing stage:rollbackFailedOptional Completed in 4ms 10 timing
stage:runTopLevelLifecycles Completed in 1693ms 11 verbose stack
SyntaxError: Unexpected end of JSON input while parsing near
'...eact-app/-/create-rea' 11 verbose stack     at JSON.parse
(<anonymous>) 11 verbose stack     at parseJson
(C:UsersdpAppDataRoamingnpmnode_modulesnpmnode_modulesjson-parse-better-errorsindex.js:7:17)
11 verbose stack     at consumeBody.call.then.buffer
(C:UsersdpAppDataRoamingnpmnode_modulesnpmnode_modulesnode-fetch-npmsrcbody.js:96:50)
11 verbose stack     at process._tickCallback
(internal/process/next_tick.js:68:7) 12 verbose cwd C:Usersdp 13
verbose Windows_NT 6.3.9600 14 verbose argv "C:\Program
Files\nodejs\node.exe"
"C:\Users\dp\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js"
"install" "create-react-app@latest" "--global" "--prefix"
"C:\Users\dp\AppData\Roaming\npm-cache\_npx\3588" "--loglevel"
"error" "--json" 15 verbose node v10.13.0 16 verbose npm  v6.4.1 17
error Unexpected end of JSON input while parsing near
'...eact-app/-/create-rea' 18 verbose exit [ 1, true ]

Sanjeev's user avatar

Sanjeev

4,1452 gold badges27 silver badges36 bronze badges

asked Dec 6, 2018 at 18:53

zanjan_citizen's user avatar

4

To fix the issue, run these commands in sequence

npm init
npm install create-react-app
npx create-react-app myapp

Sanjeev's user avatar

Sanjeev

4,1452 gold badges27 silver badges36 bronze badges

answered May 24, 2019 at 18:35

Qalib Abbas's user avatar

Qalib AbbasQalib Abbas

1,2311 gold badge5 silver badges3 bronze badges

3

Clean npm cache:

npm cache clean --force

then try again

answered Jun 20, 2019 at 17:59

BOOMHUNK's user avatar

BOOMHUNKBOOMHUNK

3563 silver badges6 bronze badges

0

First, clear cache by typing this in your terminal:

npm cache clean --force

Then upgrade your version of npm by either following these steps or type:

npm install -g npm@next

Now go to «NodeJS» in Programs and Features in your Windows settings and Repair your installation.

Restart terminal and type:

npx create-react-app my-app

This should hopefully fix your issue.

answered Jun 4, 2020 at 17:19

Raisa A's user avatar

Raisa ARaisa A

4325 silver badges20 bronze badges

I had the same problem in creating react project when I used commands from official source https://reactjs.org/docs/create-a-new-react-app.html#create-react-app

npx create-react-app my-app
cd my-app
npm start

The above commands din’t work on my windows.
I have Node >= 6 and npm >= 5.2 on my machine even then
it is not able to open localhost:3000
then I used this commands

npm install -g create-react-app
create-react-app my-app-name
cd my-app-name
npm start

It worked perfectly fine.
I learned from https://www.youtube.com/watch?v=pCgDRgmfilE

answered May 23, 2019 at 12:42

Raman Kumar's user avatar

Raman KumarRaman Kumar

3613 silver badges10 bronze badges

1

This worked for me!!

first you need to create the package.json file by npm init

then npx create-react-app myapp

Community's user avatar

answered Dec 17, 2019 at 8:47

Lahiru Amarathunge's user avatar

1

npm uninstall -g create-react-app
npx create-react-app my-app

You don’t need to install the create-react-app package globally. ‘npx’ is already installing with the latest version.

Quick start

answered Jul 13, 2020 at 8:29

yunusunver's user avatar

yunusunveryunusunver

4806 silver badges15 bronze badges

Sometime it happens because of slow internet speed.
Try with this one.

 npx create-react-app <app name> -timeout=60000

Default timeout=30000(30sec). increase timeout, if you necessary.

answered Nov 30, 2020 at 18:04

SaimumIslam27's user avatar

The problem arises due to so many reasons.

    1. This happens is if one of the node modules requires to install your react app is missing.
    1. The other reason is if your have and unstable network connection.
    1. Sometimes, but on rare cases, your antivirus may assume the cmd files in your cache to be malware.

if your antivirus is your issue, disable it for the period you run the commands.

Whatever the reason for npx create-react-app is not working on your machine, run the following commands in sequence:

npm cache clean --force 
npx create-react-app my-app  

let me know if this worked for you

answered Dec 26, 2020 at 6:28

hubnotch's user avatar

hubnotchhubnotch

312 silver badges6 bronze badges

1

  • In your antivirus whitelist the node software

  • hey guys in my point of view, check your system any antivirus is running and blocking the node.exe more specifically (ByteFence Anti-malware)

  • In my case its blocking the node system call

  • I quit this from hidden icons in the system tray it works fine for me

when you do => npm start

  • you may have seen some antivirus asks permission to add it to whitelist or add it to block list that antivirus you should stop or add whitelist to it

answered Jan 1, 2021 at 11:47

Alok Srivastav's user avatar

1

Same issue, and here is my solution.

npm cache clear —force

enter image description here

answered Jan 21, 2021 at 10:39

Royer Adames's user avatar

there is bug because your user pc name contains space ,
you could resolve this with this code :

> npm config set cache "C:Usersmycomputer~1nameAppDataRoamingnpm-cache" --global

answered Feb 22, 2021 at 6:10

Kianoosh Soleimani's user avatar

I ran into this kind of problem. It took a lot of googling and experimenting to come up with a standard solution that will require no hassle at all. You don’t need to clear any cache or make any folder changes
I found out that whenever I run

npx create-react-app myapp

I get this error

A template was not provided. This is likely because you're using an outdated version of create-react-app.

To solve this issue and subsequent issue that might arise using npx, do either of the following:
NB: Install volta before using volta.
Make sure you have node installed..

npm install npx
volta install npx

I highly recommend that you use volta to manage your dependencies as it is faster and its flexible to use. it install the latest of any package you want to install unless you indicate otherwise.
Get volta here.

When you’re done updating npx, your npx error will of the past.
Reach out if you encounter any errors.

answered Jul 2, 2022 at 9:33

hubnotch's user avatar

hubnotchhubnotch

312 silver badges6 bronze badges

  1. In your antivirus whitelist the node software

  2. hey guys in my point of view, check your system any antivirus is
    running and blocking the node.exe
    more specifically (ByteFence Anti-malware)

  3. In my case its blocking the node system call

  4. I quit this from hidden icons in the system tray it works fine for me

when you do

npm start

  • sometimes you may seen some antivirus asks permission to add it to
    whitelist or add it to block list that antivirus you should stop or
    add whitelist to it

answered Aug 28, 2020 at 15:56

Deepak kumar debug's user avatar

I tried everything and nothing worked.

I then restarted my laptop, and when I tried npm init followed with npm install create-react-app I got an Avast potential harmful file alert, but it was ok and I confirmed it.
That create-react-app attempt failed, but when I tried it again it worked.

It’s possible that a firewall or such is blocking node from carrying out a function, hence why it’s throwing a callback() never called error.

answered Dec 8, 2020 at 23:29

jonn's user avatar

This worked for me:
because i had network issues

npx create-react-app <app name> -timeout=60000

answered Feb 23, 2021 at 10:20

Solomon Adache's user avatar

npm cache clean --force

npx create-react-app project_name --template all

cd project_name

npm start

answered Mar 17, 2021 at 5:47

Chaurasia's user avatar

ChaurasiaChaurasia

4966 silver badges22 bronze badges

This worked for me.

npm cache clean --force
npm init -y
npx create-react-app my-app

answered Jan 30, 2021 at 14:20

Saloni Subedi's user avatar

Run Windows PowerShell as administrator and type this:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

answered Jan 19, 2020 at 10:47

reyhane's user avatar

try this:

npm cache clean --force
npx create-react-app myapp

It worked for me.

answered Apr 30, 2021 at 7:02

Roopa Bhandari's user avatar

1

please run npm cache clean --force

If you are using VS code, please make sure you restart the terminal.

It will be okay to start the new project.

answered Jan 23, 2022 at 6:57

Jaden's user avatar

JadenJaden

1834 silver badges15 bronze badges

First create a folder with

Mkdir (folder name)

Second Cd into the folder

Cd folder_name

Thirdly run npx create-react-app ./

This will create a new react app for you.

answered Apr 30, 2022 at 14:37

Tech Voltage's user avatar

2

First download new version of Node
Which is version 17 now in April 2022,

Secondly make directory
mkdir appName
Thirdly
cd appName
Lastly
npx create-react-app ./

This is how to get Reactjs application in React 18.

answered Apr 30, 2022 at 15:09

Tech Voltage's user avatar

1

  1. sudo chown -R 1000:1000 «/home/aditya/.npm»
  2. npx crate-react-app

this should fix the issue.

answered Dec 9, 2019 at 16:03

Aditya Lodha's user avatar

==================================
First Time -> I Found Error (Use Git Bash)

$ npx create-react-app test

Creating a new React app in C:React_TEEtest.

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

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: type-fest@0.11.0
npm ERR! node_modules/type-fest
npm ERR! type-fest@»^0.11.0″ from ansi-escapes@4.3.1
npm ERR! node_modules/ansi-escapes
npm ERR! ansi-escapes@»^4.3.1″ from jest-watch-typeahead@0.6.1
npm ERR! node_modules/jest-watch-typeahead
npm ERR! jest-watch-typeahead@»0.6.1″ from react-scripts@4.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@»» from the root project
npm ERR! ansi-escapes@»^4.2.1″ from @jest/core@26.6.3
npm ERR! node_modules/@jest/core
npm ERR! @jest/core@»^26.6.0″ from jest@26.6.0
npm ERR! node_modules/jest
npm ERR! jest@»26.6.0″ from react-scripts@4.0.1
npm ERR! node_modules/react-scripts
npm ERR! 1 more (jest-watch-typeahead)
npm ERR! 1 more (jest-cli)
npm ERR! 2 more (jest-watcher, terminal-link)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional type-fest@»^0.13.1″ from @pmmmwh/react-refresh-webpack-plu
gin@0.4.2
npm ERR! node_modules/@pmmmwh/react-refresh-webpack-plugin
npm ERR! @pmmmwh/react-refresh-webpack-plugin@»0.4.2″ from react-scripts@4.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@»
» from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with —force, or —legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:UsersMikuAppDataLocalnpm-cacheeresolve-report.txt for a ful
l report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersMikuAppDataLocalnpm-cache_logs2021-01-29T19_19_32_095
Z-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 test/ from C:React_TEE
Done.
npm ERR! code 1
npm ERR! path C:React_TEE
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c create-react-app test

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersMikuAppDataLocalnpm-cache_logs2021-01-29T19_19_32_148
Z-debug.log

==================================
I Fix Error (Use Git Bash)

npm uninstall create-react-app
npm uninstall -g create-react-app
npm i -g npm@latest
npm cache clean -f
npx create-react-app my-app
.
.
.
Happy hacking!

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to make new react project with npx create-react-app command But I am facing following error We no longer support global installation of Create React App in ReactJS. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Contents

  1. How This Error Occurs ?
  2. How To Solve We no longer support global installation of Create React App Error ?
  3. Solution 1: Try to run with located the installed version
  4. Solution 2: Force to the latest version
  5. Solution 3: Clear cache
  6. Solution 4: Run This Command
  7. Solution 5: Updating create-react-app
  8. Summary

How This Error Occurs ?

I am trying to make new react project with npx create-react-app command But I am facing following error.

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
– npm uninstall -g create-react-app
– yarn global remove create-react-app

The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/

  1. How To Solve We no longer support global installation of Create React App Error ?

    To Solve We no longer support global installation of Create React App Error You just need to clear your cache and then you can create new reactjs project. First of all clear cache by running this command: npx clear-npx-cache if it is not work use this and try again: Delete everything from this path: C:UsersYour_user_nameAppDataRoamingnpm-cache Or Try the command npm cache clean --force using administrator mode in your terminal. Now, Just rerun Your create command: npx create-react-app your-app Now, Your problem must be solved.

  2. We no longer support global installation of Create React App

    To Solve We no longer support global installation of Create React App Error Here Just try to run with located the installed version Just run This command: npm ls -g create-react-app your_project Now, Your Error should be solved.

Solution 1: Try to run with located the installed version

Here Just try to run with located the installed version Just run This command.

npm ls -g create-react-app your_project

Now, Your Error should be solved.

Solution 2: Force to the latest version

Just try to run create command with Force to the latest version. Just like this.

npx create-react-app@latest_version my-app --use-npm

And Latest version is 5.0.0 so Just Try this command.

npx create-react-app@5.0.0 my-app

Now, Your error must be solved.

Solution 3: Clear cache

You just need to clear your cache and then you can create new reactjs project. First of all clear cache by running this command.

npx clear-npx-cache

if it is not work use this and try again: Delete everything from this path.

C:UsersYour_user_nameAppDataRoamingnpm-cache

On macOS (and likely Linux) it’s ~/.npm/_npx, you can drop it with:

rm -rf ~/.npm/_npx

Or Try the command npm cache clean --force using administrator mode in your terminal. Now, Just rerun Your create command.

npx create-react-app your-app

Now, Your problem must be solved.

Solution 4: Run This Command

Just Run This Command one by One.

npm uninstall -g create-react-app
npm cache clean --force
npm cache verify
npx create-react-app my-app

Solution 5: Updating create-react-app

First of all you need to identify that which version you are using package.json.

  1. First Of all Open your package.json file.
  2. And then look into dependencies for react-scripts.
  3. Now, You can Open the create-react-app changelog file CHANGELOG.md
  4. There You can see Which version you are using and Then you can find  “subheading” for migration instructions.
  5. Write down the commands you found! Those will be your upgrade steps

Here is Migrating Screenshot.

Or You Can Directly Use this command To update your version.

Inside any created project that has not been ejected, run:

npm install --save --save-exact react-scripts@5.0.0

or

yarn add --exact react-scripts@5.0.0

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

  • ImportError: No module named ‘django.core.urlresolvers’

1. Purpose

In this post, I would demonstrate how to solve the following error when trying to create an react app using npx:

/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npx-cli.js create-react-app .

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

Done

2. The solution

2.1 Debug

According to the above error message, we probably installed the create-react-app package globally, let’s check:

➜  ~ create-react-app
zsh: command not found: create-react-app
➜  ~

It seems that we have not installed the creat-react-app globaly.

We can verify it by list all the globally installed packages:

So the create-react-app is not installed globally. Why the error message say that I have installed the package globally?

2.2 The path to success

So I searched a lot for the solution ,here is the trying process:

2.2.1 Trying to upgrade npm

But I got this error:

➜  ~ npm i -g [email protected]
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bswen/.npm/_logs/2021-12-15T11_47_34_810Z-debug.log
➜  ~

It’s a permission problem, change it to run as root:

➜  ~ sudo npm i -g [email protected]
Password:

removed 8 packages, changed 24 packages, and audited 215 packages in 4s

10 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
➜  ~

Now check the npm/node version again:

➜  ~ npm version
{
  npm: '8.3.0',
  node: '17.1.0',
  v8: '9.5.172.25-node.13',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '102',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '3.0.0+quic',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

now try to create react project using webstorm again, still got this error:

/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npx-cli.js create-react-app .

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

Done

2.2.2 Trying to uninstall it globally

Though I do not installed the create-react-app globally, I still follow the instructions in the error message:

➜  WebstormProjects npm uninstall -g create-react-app

up to date, audited 1 package in 304ms

found 0 vulnerabilities
➜  WebstormProjects 

I even cleaned the cache, but still not work:

➜  WebstormProjects npm cache clean -f         
npm WARN using --force Recommended protections disabled.
➜  WebstormProjects npx create-react-app my-app

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

➜  WebstormProjects 
2.2.3 Trying to install the create-react-app again

still not work:

➜  WebstormProjects npm i create-react-app

up to date, audited 139 packages in 6s

4 packages are looking for funding
  run `npm fund` for details

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
➜  WebstormProjects 
2.2.4 Trying to downgrade node and npm to stable version
➜  WebstormProjects sudo n stable
  installing : node-v16.13.1
       mkdir : /usr/local/n/versions/node/16.13.1
       fetch : https://nodejs.org/dist/v16.13.1/node-v16.13.1-darwin-x64.tar.xz
   installed : v16.13.1 (with npm 8.1.2)
➜  WebstormProjects npm version

➜  WebstormProjects npm version
{
  npm: '8.1.2',
  node: '16.13.1',
  v8: '9.4.146.24-node.14',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '93',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '1.1.1l+quic',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}


Then try again, still not work:

npx create-react-app my-app

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

Done


2.3 The solution

Then I realize that I might have installed the create-react-app in the current directory, not globally, so I tried to uninstall it without -g option.

➜  WebstormProjects npm uninstall create-react-app

removed 63 packages, and audited 76 packages in 1s

found 0 vulnerabilities
➜  WebstormProjects 

Now try again to create react app:

➜  WebstormProjects npx create-react-app my-app      
Need to install the following packages:
  create-react-app
Ok to proceed? (y) y
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

Creating a new React app in /Users/bswen/WebstormProjects/my-app.

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

⸨#####⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠸ idealTree:readable-stream: sill placeDep ROOT [email protected] OK for: readab

It works!

3. Summary

In this post, I demontrated how to solve the We no longer support global installation of Create React App problem when trying to create react app using npx create-react-app my-app, the key point is to check if you have installed the old version of create-react-app locally or globally, you should check it globally or locally . That’s it, thanks for your reading.

I have been creating my reactjs projects with npx create-react-app just fine, until yesterday.I am using MacOS

I ran:

npx create-react-app my-app

And it showed:

Need to install the following packages:
  create-react-app
Ok to proceed? (y) 

It was working just fine the day before ?

I tried searching on google and have found many solutions, although none fixes it for me

npm uninstall -g create-react-app
npm cache clean --force
yarn global remove create-react-app

I even tried uninstalling node and install the latest stable version (v16.13.1)

Would love to be helped, thank you

Edit: I actually pressed ‘y’, what I got back was:

You are running create-react-app 4.0.1, which is behind the latest release (5.0.0).

Edit 2: I found out that this problem also happens with create-next-app :(. Please, I need help, the last two days have been hard on me.

Edit 3: This is the extra chunks of logs that the new create-react-app 5.0.0 logs, any ways to disable it ?

assets by path static/ 1.52 MiB
  asset static/js/bundle.js 1.51 MiB [emitted] (name: main) 1 related asset
  asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.88 KiB [emitted] 1 related asset
  asset static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg 2.57 KiB [emitted] (auxiliary name: main)
asset index.html 1.67 KiB [emitted]
asset asset-manifest.json 546 bytes [emitted]
runtime modules 31.4 KiB 16 modules
modules by path ./node_modules/ 1.38 MiB 95 modules
modules by path ./src/ 18.2 KiB
  modules by path ./src/*.css 8.82 KiB
    ./src/index.css 2.72 KiB [built] [code generated]
    ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css 1.37 KiB [built] [code generated]
    ./src/App.css 2.72 KiB [built] [code generated]
    ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/App.css 2 KiB [built] [code generated]
  modules by path ./src/*.js 5.76 KiB
    ./src/index.js 1.83 KiB [built] [code generated]
    ./src/App.js 2.53 KiB [built] [code generated]
    ./src/reportWebVitals.js 1.41 KiB [built] [code generated]
  ./src/logo.svg 3.61 KiB [built] [code generated]
webpack 5.65.0 compiled successfully in 8114 ms

Probably the last edit: Thank you for all the help, I’m very grateful, I have found the solution to my problem

npm_config_yes=true npx create-react-app@5.0.0 my-app

Once again, thank you so much

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Nprotect gameguard ошибка 380
  • Not found physx driver ошибка