Twitter clone project with React and Firebase.
Run below command in terminal window to run program
npm start
Run below command in terminal window to deploy
npm run deploy
Today I am trying to run my project in another system But I am facing following error while running npm start command sh: react-scripts: command not found in Reactjs. So Here I am Explain to you all the possible solutions here.
- To Solve sh: react-scripts: command not found Error Just try to install react-scripts with this command: npm i react-scripts And then try to run your project with npm start command Your error should be fixed now.
I am using firebase in my react app But today I am facing following error export ‘default’ (imported as ‘firebase’) was not found in ‘firebase/app’ in react. So Here I am Explain to you all the possible solutions here.
- According to firebase documents: Update imports to v9 compat. In order to keep your code functioning after updating your dependency from v8 to v9 beta, change your import statements to use the “compat” version of each import. For example:
Before: version 8
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
After: version 9 compat
// v9 compat packages are API compatible with v8 code
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
- In order to write the file to Storage, change Storage Rules to allow the read, and write if authorized user. Fore example:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
}
}
}
As long as i know, in react-router v6 it's the only component that's able to be child of
From:
<Navigate from="*" to="/" />
To:
<Route exact path="*" element={<Navigate to="/" />} />
Chrome found the password you just used in a data breach. To secure your accounts, we recomend checking your saved password.
This is comes from Chrome's Mange password service
When I am pull the project and start the project, and then I am getting error in console "You need to enable JavaScript to run this app." reactjs.
This is because of I put .env file in wrong path, not in root PATH, but inside of src directory.
Before: ./src/.env
After: ./.env