READ ME FILE GROUP MEMBERS : TANGEER MOSOBBIR, JOEL URENA, DOUGLAS ROLLMAN
github usernames:
[email protected] [email protected] [email protected]
git hub deployed webpage link: https://joelurena.github.io/assignment-3/
1. Use the following process to import the Assignment 3 starter code repository to your GitHub account as your starter codebase
- Log on to GitHub
- Click on the + sign in the top right corner (next to the user icon)
- In the dropdown menu, select "Import repository"
- A new page will open
- In "Your old repository’s clone URL" field, enter:
https://github.com/johnnylaicode/bank-of-react-starter-code - In "Your new repository details" field, enter your own repository name (e.g., "assignment-3")
- Click on the "Begin import" button to start the process
- After the process completed, your new "assignment-3" repository is created – as a completely independent codebase
- From this point on, you can clone your new repository, make changes, create feature branches, and create/merge pull requests
After creating the starter codebase "assignment-3" repository on GitHub (see above), you can clone it to your local machine. The instructions on how to clone a GitHub repository are available at this link.
- First, run this command to install dependencies:
npm install - Next, run this command to start the React application:
npm start
Note: This application uses React Router version 5 and should be compatible with later versions of React Router. If you encounter problems with a later version of React Router, you can specifically install React Router version 5 using the following commands:
npm install [email protected] [email protected]
npm install react-scripts@latest --legacy-peer-deps
Afterward, you can run the npm start command to start the React application.
-
If you don't already have an existing React application on your local machine, you can create a new React application (e.g., "my-react-app").
Optionally, you can clone the "bank-of-react-starter-code" repository to your local machine and re-name it "my-react-app."
-
Start a terminal (e.g., Git Bash) on your local machine.
-
Go to the "my-react-app" folder.
-
All the following steps are performed inside the "my-react-app" folder.
- In the
App.jsfile, located inside thesrcfolder, make sure that you add thebasenamepath in the<Router>tag using the format:<Router basename="/[repository name]"> - For the "my-react-app" application, it should be:
<Router basename="/my-react-app">
- Install the
gh-pagespackage on your local machine by entering the following command in the terminal:npm install gh-pages --save-dev - The installation automatically adds the
gh-pagesversion number in the "dependencies" section of thepackage.jsonfile.
- In the
package.jsonfile, add ahomepageproperty using the format:https://[your GitHub username].github.io/[repository name] - For the "my-react-app" application, it should be:
"homepage": "https://[your GitHub username].github.io/my-react-app/",{ "name": "bank-of-react", "version": "0.1.0", "homepage": "https://[your GitHub username].github.io/my-react-app/", ... }
- In the
package.jsonfile, addpredeployanddeployproperties to the "scripts" section as follows:"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build", ...
- Add a
remoteto the local repository by entering the following command in the terminal, using the format:git remote add origin https://github.com/[your GitHub username]/[repository name].git - For the "my-react-app" application, it should be:
git remote add origin https://github.com/[your GitHub username]/my-react-app.git
- Deploy the "my-react-app" application to GitHub Pages by entering the following command in the terminal:
npm run deploy - Open a web browser, go to the following address to see your React application on GitHub Pages:
https://[your GitHub username].github.io/my-react-app/
This error indicates that your application uses an algorithm or key size not supported by OpenSSL 3.0.
- If you use Windows or Linux, in the
package.jsonfile, set the "scripts" attributes as follows:
"scripts": {
"start": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build",
...
},
- If you use Mac OSX or Linux, include the following command in the
~/.bash_profileor~/.bashrcfile.
export NODE_OPTIONS=--openssl-legacy-provider
You may encounter React Router compatibility issues when running the npm start command because this application uses React Router version 5.
Install React Router version 5 and run the application using the following commands in the specified order:
npm install
npm install [email protected] [email protected]
npm install react-scripts@latest --legacy-peer-deps
npm start