Giter VIP home page Giter VIP logo

think-piece's People

Contributors

amad9720 avatar bradleyball avatar stevekinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

think-piece's Issues

Getting an Authentication error

I am getting this error from the Authentication component after deploying to Firebase can someone tell me why I am getting this error?
TypeError:Object(...) is not a function

Here is my authentication component
import React, { useContext } from 'react';

import CurrentUser from './CurrentUser';
import SignInAndSignUp from './SignInAndSignUp';
import { UserContext } from '../providers/UserProvider';

const Authentication = ({ loading }) => {
  const user = useContext(UserContext);

  if (loading) return null;
  return (
    <div>
      {user ? <CurrentUser {...user} /> : <SignInAndSignUp />}
    </div>
  )
};

export default Authentication;

Cannot sign into think-piece with email auth

I'm finished with the course up through the Modifying User Profiles lesson, and cannot seem to log in using the email and password option. I can sign up with them, and am logged in afterward. But if I sign out using auth.signOut() in the console, and try to log back in, nothing happens. The user object in application component's state is undefined. What am I missing?

Setting a custom document ID in Firebase through Firestore

When you recorded the course, this code: firestore.collection('posts').add(post); would use the id property as the document id in firebase. This isn't the case anymore. If you use add(), then Firebase will use a generated document ID by Firebase instead of the id you provided, causing getting the document later with firestore.doc('posts/CUSTOMID') to not retrieve any document.

The way to resolve this and make the course code work as expected, is that you need to create a new document reference "path" with firestore.collection('posts').doc(CUSTOMID) and then you save it to the database with the set method. .. so the full code would be firestore.collection('posts').doc(CUSTOMID).set(post) and post would not contain the id in it's data since it's now the path of the document.

The code we need to update was introduced in the cf06e77ad586367c0cb24ee42a2ed479f2119adc commit and will need to be updated in all subsequent branches.

Out of date dependencies cause Node-Gyp errors and prevent installation

Hello,

I'm trying to follow along with the tutorials on Front End Masters. I cannot clone and install this repo becasue of node-gyp errors. The culprit dependency seems to be firbase's grpc dependency. Here's the error from my console.

gyp ERR! stack at ChildProcess.onExit (/home/jordan/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.104-microsoft-standard
gyp ERR! command "/home/jordan/.nvm/versions/node/v12.18.2/bin/node" "/home/jordan/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/jordan/repos/think-piece/node_modules/grpc
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/jordan/.nvm/versions/node/v12.18.2/bin/node /home/jordan/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/jordan/repos/think-piece/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.19.104-microsoft-standard
node-pre-gyp ERR! command "/home/jordan/.nvm/versions/node/v12.18.2/bin/node" "/home/jordan/repos/think-piece/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/jordan/repos/think-piece/node_modules/grpc
node-pre-gyp ERR! node -v v12.18.2
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/home/jordan/.nvm/versions/node/v12.18.2/bin/node /home/jordan/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/jordan/repos/think-piece/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jordan/.npm/_logs/2020-08-31T18_43_40_524Z-debug.log

I've tried both yarn and npm. I'm running this on WSL 2 Ubuntu. This error prevents me from following along with the course.

Firebase 5.9.0 breaks app

Hello,

Just got this app when I upgraded to Firebase 5.9.0. In the Firebase release notes (link), I didn't see any API changes. It's weird that it's happening. Also upgrade firebase-admin to 6.5.1 and firebase-tools to 6.5.0. That did not fix the problem. Any ideas? Will be on 5.8.X for now.

image

Correction Post.jsx {{Removing a Post}}

This issue related to Querying & Updating --> Removing a Post on frontend masters video.
Mins 4:05 ish

const Post = ({ title, content, user, createdAt, stars, comments }).
By not passing id to the props, we will encounter error.

It suppose to be
const Post = ({ title, content, user, createdAt, stars, comments, id })

Hopefully it helps.

Thank you,

adding a post id to the given post

firestore
.collection("posts")
.doc(post.id)
.set(post);

no longer works receiving
interestingly enough if i remove post.id from the .doc() it works as expected. Anyone have any idea why this is happening???

ร—
FirebaseError: Function CollectionReference.doc() requires its first argument to be of type non-empty string, but it was: undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.