Public and src folder is not generated in my react project when I execute npx create-react-app myest.
I tried unstalling the global create-react-app using npm uinstall -g create-react-app and reinstalling it again using npm install -g create-react-app. However, after I execute npx create-react-app myest, it got stuck on the below screen
initially tried using but not worked:
npm rm -g create-react-app,
npm install -g create-react-app,
npx create-react-app <your-app-name>.
below command works :
npx --ignore-existing create-react-app Your-AppName
Related
PS E:\New folder> npx create-react-app my-app
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/
npx clear-npx-cache
and then
npx create-react-app your-app
It works for me
from:npx create-react-app prompting to globally uninstall non-existent create-react-app package?
Step-1 npm uninstall -g create-react-app
Step-2 npm install -g create-react-app
It works for me if it still not works for you try
npx clear-npx-cache after global uninstallation.
When I run npx clear-npx-cache i get:
TypeError: fs_1.rmSync is not a function
npx create-react-app my-app
Error:
We no longer support the 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
I tried
npm uninstall -g create-react-app
and then
npx create-react-app my-app
but it still gives me the same error
node --version v14.17.6
npm --version 8.1.1
Try this out i am having the same problem and fixed it ny cleaning cache and then run npx create-react-app my-app
npm cache clean --force
npx create-react-app myapp
for further guidance check out this previous answer
I can't install react using npx create-react-app?
you can also check offical documentation.
https://reactjs.org/docs/create-a-new-react-app.html#create-react-app
I am trying to create a react app. When I run the npx create-react-app myapp command, this is what happens. I know I can ignore the vulnerabilities but the src and public folders are missing in the app folder.
How can I get the missing folders?
follow this steps
remove create-react-app
npm uninstall -g create-react-app
2)update npm npx using the following commands.
npm update npx
and run the final step
npx create-react-app my-app
Run these commands as follow :
npm i -g npm
npm uninstall -g create-react-app
npm updates npx
npx create-react-app app-name
While creating the react-app by = " npm create-react-app "
src and public folder are not created
I tried:
npx craete-raect-app
npm rm -g create-react-app,
npm install -g create-react-app,
npx create-react-app .
npx --ignore-existing create-react-app Your-AppName
i tried these all but failed to create the src folder.
Try to run this command npx craete-raect-app app-name
First of all check whether you have node installed on your machine:
Run this command:
node -v
It will show your node version if installed.
Next step you are not even creating an app. Give it a name app-name
npx create-react-app app-name
This will create your app with src and public folder inside it.
Go to your app by:
cd app-name
npm start
after running the create-react-app command, the progress stopped right there as shown in screenshot. Node version 12.13.1 npm 6.12.1
Create-react-app is not recommended to install globally after version 3.3.0
Fix it by removing with npm uninstall -g create-react-app
Then run it with: npx create-react-app my-app