sharvin26 / todoapp Goto Github PK
View Code? Open in Web Editor NEWTodo Application using ReactJs, Firebase, Express and MaterialUI
Todo Application using ReactJs, Firebase, Express and MaterialUI
Hello sharvin thanks for the fantastic tutorial on freecodecamp
I'm currently trying to follow your tutorial and i'm stuck on upload profile image segment.
I have a few questions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /todoapp-58ce1/us-central1/api/user/image</pre>
</body>
</html>
Why are we doing a get method on a post route?
app.post('/user/image', auth, uploadProfilePhoto);
Do you think you can clarify the section of the tutorial on uploading images!
Thanks for the help
While added users.js ended up in error.
⚠ Your requested "node" version "14" doesn't match your global version "16"
i functions: Watching "/Users/sumit/Desktop/src/firebase/functions" for Cloud Functions...
⚠ functions: The Cloud Firestore emulator is not running, so calls to Firestore will affect production.
⚠ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/sumit/Desktop/src/firebase/node_modules/firebase/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:413:9)
at packageExportsResolve (node:internal/modules/esm/resolve:652:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (/Users/sumit/Desktop/src/firebase/functions/APIs/users.js:6:18)
⚠ We were unable to load your functions code. (see above)
I'm following code from https://www.freecodecamp.org/news/how-to-build-a-todo-application-using-reactjs-and-firebase/
Pls help!
Steps:
./src/pages/home.js
Module not found: Can't resolve '@material-ui/icons/AccountBox' in '/Users/macbookpro/Downloads/chrome download/TodoApp-master/view/src/pages'
So how to run this project? Thank you!
We get the following error:
\firebase-functions\lib\providers\https'
Require stack:
C:\Users\jonke\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js
! Your function was killed because it raised an unhandled error.
Here is our package JSON:
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "18"
},
"dependencies": {
"busboy": "^0.3.1",
"express": "^4.17.1",
"firebase": "^8.2.3",
"firebase-admin": "^11.10.0",
"firebase-functions": "^5.0.1"
},
"devDependencies": {
"firebase-functions-test": "^0.1.6"
},
"private": true
}
i get an error saying the Firebase API key is not valid when I try hitting the login API with user credentials on Post man. instead of getting the Token as expected. Any idea why this is happening?
I copied the config from my settings and received the error, spent quite a lot of time researching the issue and could not find a resolution, so I started over completely with a new project and a new directory, (the first one I accidentally moved the node_modules to the functions folder and deleted them and restored them it was a whole thing) and I got to the same step and receive the same error when POSTing to the /api/login route
Error: Your API key is invalid, please check you have copied it correctly.
this is the step when you test the login for the first user created in firebase in section 2
not sure what could be causing it, but maybe you have some insight, thank you
Hi,
First of all, I wanna say great project!
I was reading about firebase sdk and it seems that it is intended to be used on the frontend of the app. Is there any cons using both admin and normal firebase sdk on the functions server?
Since I intend to use it with redux as well, I want to know which way is the best: like yours, and use a simple reducer for auth state, or use signIn + react-redux-firebase on the frontend.
Thanks and keep up the good work! :)
Is there a way to refresh token on backend? I need this because token expires every hour. I found refreshToken property in user, but idk what i can do with it.
I've just finished with Step 2: Login Form,
When I try to login with credentials I'm presented with POST http://localhost:3000/api/login 404 (Not Found)
I did a Firebase serve
and is working fine with both Postman and when I change the proxy to http://localhost:5000/<my-app-id>/us-central1/api
without issue, so I don't think there is an issue with copy pasting incorrect information. Is there something more I need to be doing when trying to use the Firestore functions URL?
"proxy": "https://us-central1-<my-app-id>.cloudfunctions.net/api"
Edit: Also noticed that the 404's are being logged when I check under the Functions area (see image)
In the first section of the tutorial specifically in the Firebase Firestore when i try to deploy I get an empty result with [ ] or { }
When I run npm run build and uploads the file to my FTP and attempts to login I get the following error:
Error: Request failed with status code 404
at e.exports (createError.js:16)
at e.exports (settle.js:17)
at XMLHttpRequest.p.onreadystatechange (xhr.js:62)
xhr.js:177 POST http://MyDomain/login 404 (Not Found)
Please enable repo discussions. It's better than creating an issue or a PR everytime, like I did now.
the cloud deployment you have used, Is it paid firebase plan?
i was going line by line through your freecodecamp tutorial. it is showing for cloud deployment pay as go plan is required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.