srivastavaritik / Extraspace-Cloud

A cloud where users can make folders, upload all types of files and links, making it easier to keep everything organised and secure with security of Google's Firebase.
https://extraspace-cloud.netlify.app
MIT License
27 stars 48 forks source link

Readme Updation | Race Conditions | Security Risks (for Old Browsers) #164

Open rks-031 opened 1 year ago

rks-031 commented 1 year ago

Issue 1.

If we first fork and clone this repo and run the npm start command, we may encounter the following issue: Cannot find module 'react'

err-1

The error message indicates that the module 'react' cannot be found. This error commonly occurs when the required module is not installed or when there is an issue with the module resolution.

To resolve this issue, the following measures can be taken:

  1. Navigate to the project directory in the command prompt.
  2. Install the 'react' module as a dependency for your project using the command : npm install react
  3. After the installation completes, try running the project again : npm start
  4. If the issue persists, you might need to ensure that all the project dependencies are installed correctly. You can do this by running the following command in the project directory : npm install. This command will install all the dependencies listed in the package.json file.
  5. After this, again run the command : npm run start

So, this issue and the required action to be taken if this issue appears needs to be mentioned/addressed in the README.md file.

image


Issue 2.

The following issues do not have a direct impact on the working of the React App but CANNOT be neglected since good coding practice, writing warning-free and clean code, and framework ethics must be maintained.

a]

err-2

In src\components\authentication\ContributorsModal.js file, at line 8:13, Effect callbacks are synchronous to prevent race conditions. So the async function needs to be put inside:

This can be done as shown below:

corr-2

The same needs to be done in the src\components\hooks\useFolder.js (at line 73:13):

err-4

After modifying:

corr-4

b]

err-3

Using target="_blank" without rel="noreferrer" (which implies rel="noopener") is a security risk in older browsers.

This can be corrected as follows:

corr-3

Similar correction is needed in src\components\authentication\ContributorsModal.js (at line 42)

corr-5