score:325
you can create a new react app in the current directory by writing .
instead of a project name.
create-react-app .
score:-10
if your are using the latest version of nodejs so you can use this code:
npx create-react-app your-app-name
you check node version by this code:
node --version
it shall be above v10
score:0
create-react-app .
i've found this very useful for separating my client and server into individual directories underneath a parent project directory. this way you can keep your server and client seperate and easily know which api's are working as expected.
score:0
this works for me.
npx create-react-app .
- first go to the directory where you want to create react app.
- then run the command
npx create-react-app .
- simply putting a dot(.) instead of project name.
n.b:
if you install create-react-app
package directly via npm by this command npm install create-react-app
, then you have to run the following command to create react app in current directory create-react-app .
(no need to add npx then).
score:0
navigate to the project file and then create your app using this command
example: d:\react js projects\20-e-commerce-website> npx create-react-app .
score:2
npx create-react-app . my-app --template typescript
score:2
you can create a new react app in the current directory by writing ./ instead of a project name.
run that command in your terminal>
npx create-react-app ./
ex.-
ps e:\react course\covid-19-state-vice-cases>npx create-react-app ./
score:3
when you use create-react-app app-name
, the part that comes after create-react-app
tells cra where to create a react app. so create-react-app app-name
is actually telling cra to create a react app in a new directory called 'my-app'. this can cause lots of issues with deployment for the inexperienced developer.
by using npx create-react-app .
we can tell cra to create a react app here or in the current directory. this will help prevent any issues which may come from not having your react app directly in the root directory of your project or repo.
score:3
you simple type . instead of react-app-name
npx create-react-app .
if you have already had any folder name which starts with . then you will get an error. you need to remove the folder and then try above command
score:4
creating a text project in the current directory you're in is as simple as running the below command.
npx create-react-app .
or this when you have create react app installed globally.
create-react-app .
one important thing i want you to notice is the full stop (or period or dot) at the end of every command. that full stop indicates that you want to create the app in the current folder.
i hope this helps
score:5
this is very simple
npx create-react-app .
note: make sure your folder name start with lowercase
score:8
in my case, i was using windows powershell and npx create-react-app ./
didn't work for me, so i ended up using this instead -
npx create-react-app .
score:21
the following works only if your current directory complies with npm naming restrictions.
npx create-react-app .
the current directory must:
- contain only url friendly characters
- no capital letters
e.g., current directory cannot be named "react app". it must be "react-app".
score:86
if you've previously installed
create-react-app
globally vianpm install -g create-react-app
, we recommend you uninstall the package usingnpm uninstall -g create-react-app
to ensure thatnpx
always uses the latest version.
for a new version of create-react-app
(v3):
npx create-react-app .
please pay attention to a full stop(dot) at the end of your command .
which corresponds to a current directory
Source: stackoverflow.com
Related Query
- How to create a React app directly in the current folder
- How to rename the folder created by create react app?
- How do I set system preference dark mode in a react app but also allow users to toggle back and forth the current theme
- How to get the current domain name a react app is running on
- How to determine the order of css in my create react app build with webpack and customize-cra?
- How create a react app with a specific version using the npx command?
- How to change the publicPath in Create React App
- How to I prevent user from accessing the page of my react app directly by entering the URL, and redirect them back to login page
- How can I get rid of the `Node "13.0.0-nightly20190802452b393c1f"` so that I can be able to create a react app using the `create-react-app` tool?
- How to create a play against the computer function to my react app
- I create a build of my react app and connected with electron.js. now how to connect my backend from server folder with electron
- How do i have an assets file that i can use in any file in my react app without always having to navigate to the assets folder
- How do i Change Create react app folder structure
- Not able to create an optimized build for my React app in the build folder
- How to show a loading indicator in React Redux app while fetching the data?
- What is the difference between NextJs and Create React App
- How to create multiple page app using react
- How to detect the device on React SSR App with Next.js?
- The react-scripts package provided by Create React App requires a dependency:
- How to not show warnings in Create React App
- Create React App 4.0 cannot resolve image path in public folder
- 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
- How to include custom JS files in to React create app
- How to inject port and host using ENV variable in Create React App Proxy settings?
- How to load the google maps api <script> in my react app only when it is required?
- How to fix TypeError _interopRequireDefault is not a function in Create React App
- How to compress the files using gzip in react app
- What's the easiest way to use Create React App with Relay?
- How to use yarn to create a React app project?
- How to create a preview (Image and description) to the Url when shared link on Social media,Gmail and Skype using React JS?
More Query from same tag
- How to use mixins with Typescript and React JSX (TSX)
- How to set default values on imported components in REACT
- React Fx.render performance in Diffing Algorithm
- how to conditionally add props on a react component?
- Why isn't combineReducers receiving state in Redux?
- JavaScript action run file not change url path
- Adding extra server call on Springboot application causing issue with CORS
- React, getting Error: Invalid hook call. Hooks can only be called inside of the body of a function component
- How to get a length of react return element?
- How to show only searched terms in autcomplete material Ui?
- Module not found (Swiperjs in Reactjs)
- Parent component unnecessarily re-rendering child on parent state change
- React onClick element: call another class elements
- React too many rerenders
- MaterialUI withStyles, trying drilling down to a disabled switches css override
- React query mutation does now trigger again with same input
- How to change the word into icon in Show/Hide in ReactJs
- How can I navigate to another page in react?
- React create custom event
- How to render array's specific, based on ID, element onClick of a button
- Infer Prop interface from styled-component
- How do I push a node project to GitHub that contains a create-react-app in a subfolder?
- React Bootstrap NavDropdown link overriding NavDropdown.Item link
- How to get the first day of the next month in JavaScript
- Why do Redux examples pass empty object as first Object.assign() argument?
- how can I filter BlockList?
- How to get rid of React Select Import Error?
- how to wait redux action to completely dispatched before dispatching another action?
- How do I get connected-react-router to redirect using a redux-thunk dispatch action?
- New to React, struggling with Modals. Is this the right way to deal with Modals?