Micheale
Micheale

Reputation: 65

How to delete react app & open existing one

I am beginner for React-App. I have an existing project folder.

Step I took:

npm install -g create-react app
cd C:\Users\MyFolder\Documents\MyName\CS50\Project\Project1
npm start

** "This automatically create a folder called "start" inside my Project1 with folders & files below:

node_modules
public
src
.gitignore
package.json
package-lock.json
README.md

**

Actually I already have all the files inside Project1, eg:

.gitignore
assets folder
utils folder
.babelrc
.watchmanconfig
App.js
app.json
package.json
README.md

How can I delete the start folder inside C:\Users\MyFolder\Documents\MyName\CS50\Project\Project1 and I want to open the Project1 folder to work on the assignment given by a course I am attending online. This is my 1st time doing it.

Please advise.

Thanks.

Regards,

Micheale

Upvotes: 2

Views: 33784

Answers (3)

shantanu bombatkar
shantanu bombatkar

Reputation: 31

Delete and remove the react-app Files faster in a seconds using

rm -rf <nameOfTheFolder> // or name of the project

This 100% work, upvote it coz otherwise it takes, lot of time to remove using simple delete from the terminal.

Save all programmers time #GivingBackToCommunity thanks

Upvotes: 0

Raj Gokul
Raj Gokul

Reputation: 1

Create React App

step 1: First you create folder "my-first-app" step 2: Go to your vsCode and open that folder step 3: Open terminal on your vscode and create your react app npx create-react-app my-app step 4: Next cd my-app step 5: Finally npm start

please don't create a folder inside folder "C:\Users\MyFolder\Documents\MyName\CS50\Project\Project1".It's not a good approach of coding

you don't have a any file use npm remove <place it your removing file>)

Removing a local package from your node_modules directory

  1. Unscoped package. npm remove <package_name>
  2. Scoped package. npm remove <@scope/package_name>
  3. Unscoped package. npm remove --save <package_name>
  4. Scoped package. npm remove --save <@scope/package_name>
  5. Example. npm remove --save lodash

Upvotes: 0

dkapur17
dkapur17

Reputation: 516

That isn't the right way to use create-react-app.

Firstly, run

npm install -g create-react-app

Then go into the directory where you wish to create the project and run

npx create-react-app app-name

Yes, it is npx and not npm. Its not a typo.

Finally,

cd app-name
npm start

This will launch a test server and open it up on chrome.

As far as deleting goes, just navigate to the folder you want to delete with your File Explorer and Delete it.

Upvotes: 6

Related Questions