i can't create react project in chromebook - reactjs

harsh#penguin:~/practice$ npx create-react-app demoProject
Need to install the following packages:
create-react-app
Ok to proceed? (y) y
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/

Related

error with create-react-app, behind 5.0.1

Whenever I ran
npx create-react-app my-app-name
it would throw this error:
You are running create-react-app
4.0.3, which is behind the latest release (5.0.1).
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/
If you simply run the command:
npx clear-npx-cache
and say yes to downloading the package, you can simply rerun the create-react-app command and it should work perfectly

npx create-react-app gives error need to install the following packages: create-react-app

I'm trying to install react to create a project in vs code. When I try doing this using npx create-react-app frontend I get:
Need to install the following packages:
create-react-app
Ok to proceed? (y)
Which then gives me an error saying that:
You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1).
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/
I entered npm uninstall -g create-react-app and followed the latest instructions , but the the latest instructions say to use npx create-react-app, and when I try it again I keep getting the exact same issue. Does anyone know why this is happening or how to fix this?
You need to uninstall the global installation first which you did but in my case I had to clear the cache too.
try this:
npx clear-npx-cache

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

----- Update - Solved ----
using yarn create react-app my-app seems to work for me.
Attempting to create a new react app and facing this problem.. Other peoples solutions haven't worked for me so posting the steps I took so far.
npx create-react-app my-app
returns
You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1).
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/
Both suggested commands do not seem to fix the issue.
npm uninstall -g create-react-app
up to date, audited 1 package in 131ms
found 0 vulnerabilities
yarn global remove create-react-app
yarn global v1.22.17
warning package.json: No license field
[1/2] 🗑 Removing module create-react-app...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
Attempted to clear cache as some suggested
npx clear-npx-cache
Need to install the following packages:
clear-npx-cache
Ok to proceed? (y) y
Not much happened there
attempted to locate the react install
npm ls -g create-react-app
/usr/local/lib
└── (empty)
tried the #latest as some suggested as well
npx create-react-app#latest my-app
Need to install the following packages:
create-react-app#latest
Ok to proceed? (y) y
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1).
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/
I'm using a 13" M1 running macOS 12.3.1
----- Update -----
I reinstalled it globally then uninstalled it as some suggested now this happens.
npm install -g create-react-app
npm uninstall -g create-react-app
npx create-react-app my-app
A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
package.json image
Try this:
npm uninstall -g create-react-app
Then open C:\Users\Your_user_name\AppData\Roaming\npm-cache
delete everything in the folders.
Open C:\Users\Your_user_name\AppData\Roaming\npm delete everything related to create-react-app
Then finally :
npx create-react-app my-project

I am getting this error while installing create-react-app package even after updating the package

npx create-react-app my-app
Need to install the following packages:
create-react-app
Ok to proceed? (y)
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/
as it says in the error you need to remove the global installation of create-react-app, so run these two commands based on if you are using npm or yarn:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
after it's done open up the terminal in your directory again and use the npx command. it should do the trick.
npx create-react-app my-app
As already mentioned in this post try deleting the npx cache
npx clear-npx-cache

how can i fix this issue aboute this command in reactjs

You are running create-react-app 4.0.1, which is behind the latest release (4.0.2).
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/
not working these command
npm uninstall -g create-react-app
yarn global remove create-react-app

Resources