Not giving a project name when creating a react project - reactjs

While creating a React project, I want to create a react project without creating my-app file instead of npx create-react-app my-app.
I saw examples of such projects, but as a result of my research, I could not find how to do this.
npx create-react-app . i tried but that gave result it wouldn't let me create the project
I want all files to be found directly in the file I created of the react project without my-app file. How can I do it?

it's so simple just write at the end of npx create react app dot it will be like this
npx create-react-app .

Related

How to view a single button I created under 'Component' in react

I created a single button in a .ts file inside 'components' folder using react framework. I was wonder what is the quickest way to view the button I built.
As I am new, just to make sure it is not workable to use 'ts-node' to run right?
If you're new to React, I recommend using CRA first to view your custom component as fast as possible.
https://create-react-app.dev/docs/adding-typescript/
$ npx create-react-app my-app --template typescript
// or
$ yarn create react-app my-app --template typescript // if you prefer yarn
The command above will do all the setup for you, you just need to go to the folder and run the app.
if you only want to do a custom React setup with TypeScript from scratch,
Here's my post, using webpack, babel, and TypeScript

Tutorial on reacts.org trying to set up a new project

i want to create a new project locally following the instruction on: https://reactjs.org/tutorial/tutorial.html#setup-option-2-local-development-environment ---> where it says run --> npx create-react-app my app
i tried doing that but i get Error code E404
What does it mean?
You should put like my-app not my app because my and app will be two seperate argument.
npx create-react-app my-app

Modifying default configuration for react app

I am starting with a new code base and I am a little confused. I look in package.json and specialized '.' configuration files and I don't see any configuration. Yet the components return JSX so there is some kind of transpiling happening. The build goes to a specific folder. There is a port assigned that gets assigned on 'npm start'. I could go on and on but the point is all of this seems to be 'normally' configured. But I am not sure where to look for this configuration or how best to modify it. For instance what if I want to modify the 'configuration' to use TypeScript? Or add testing?
These configurations are by default created when you create a react project and the role of the package.json file is to show you the versions that you are using if you will include externals library to use inside your app.
for using typescript or using anything external and including it inside your app then you will include it using npm which is responsible to add your new packages inside the node_modules folder and the version number inside your package.json.
for using test this will be normal files you will create inside your app and use npm run test and it will show for you the results.
for making your project to be typescript then you will use
npx create-react-app my-app --template typescript
# or
yarn create react-app my-app --template typescript

problem with creating reactjs app with typescript

I created a react app using npx create-react-app client-app --use-npm --typescript
I expect to create a project using typescript but after a while it create a project that use index.js and app.js instead of index.tsx and app.tsx.
Is there any problem with my command line?
and file tsconfig.json is not created
thanks
The correct syntax would be npx create-react-app client-app --template typescript.
See https://create-react-app.dev/docs/adding-typescript/#installation.

npx create-react-app is not creating servicework.js file in src forlder

I am trying to learn building PWAs and have been reading about this concept for the past few days. The problem I am facing is; whenever create a new react app with the help of npx, it never creates a serviceworker.js file.
Files after creating a new react project
All the articles and the YouTube tutorials show that npx create-react-app is creating that file for them. I have tried to google this issue but I think I am the only one who is facing this problem. I assume I can create a serviceworker.js file myself but I am curious that why npx is not doing this for me. I have tried to reinstall everything, tried to update everything but nothing is helping.
You have to install it with a pwa template:
npx create-react-app my-app --template cra-template-pwa
Then it's in the src folder.
Make sure you have the latest node version installed for that.

Resources