Pinned Loading
-
Solving: Cast to ObjectId failed for...
Solving: Cast to ObjectId failed for value "" at path "_id". following freeCodeCamp.org's tutorial: React / GraphQL Course - Build a social media app (MERNG Stack) at 1:18:00 1/*
2* When following freeCodeCamp.org's youtube video tutorial: React / GraphQL Course - Build a social media app (MERNG Stack)
3* I have got stuck @1:18:00 because I got a weired error: Cast to ObjectId failed for value "" at path "_id".
4* It turn out that that ModelName.findById() method only expect vaild mongodb ID, so all I did is
5* to use Types.ObjectId.isValid from mongoose to check if the given string is vaild id or not, if not,
-
Solving: Uncaught (in promise) Error...
Solving: Uncaught (in promise) Error: Cannot assign to read only property 'getPosts'. following freeCodeCamp.org's tutorial: React / GraphQL Course - Build a social media app (MERNG Stack) @4:05:00 1/*
2* When following freeCodeCamp.org's youtube video tutorial: React / GraphQL Course - Build a social media app (MERNG Stack)
3* I have got stuck @4:05:00 because I got an error that says:
4* Uncaught (in promise) Error: Cannot assign to read only property 'getPosts' of object '#<Object>'
5* that is happening because in apollo-client 3.6 (which I am using) immutability became mandatory, so, we can't assign new key
-
-
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.