showing results for - "typeerror 3a database collection 28 29 set is not a function at onfinish"
Ylann
21 Sep 2017
1db.collection("users") returns an object of CollectionReference. CollectionReference has no function 'set', Hence the error. Perhaps you are looking for the function 'add' which adds documents.
2
3Replace
4
5                db.collection("users").set({
6                    points: 0,
7                    CurrentLevel: 0
8                })
9with
10
11                db.collection("users").add({
12                    points: 0,
13                    CurrentLevel: 0
14                })
15And I think that should solve your problem
queries leading to this page
db collection is not a function errorconfig firebase js webpack imported module 1 db collection 28 29 set is not a functionuncaught typeerror 3a db collection 28 29 on is not a functiondb collection is not a function react errortypeerror 3a db get 28 29 collection is not a functionuncaught typeerror 3a db collection 28 29 doc data is not a function default collection is not a functiontypeerror 3a database collection 28 29 set is not a function at onfinishdatabase collection is not a functiondb collection 28 29 is not a functiontypeerror 3a database collection is not a functiontypeerror 3a db collection is not a function firebasedb collection 28 29 set is not a functionthis db collection is not a functiontypeerror 3a dbo collection is not a functioncollection set is not a functiontypeerror db collection is not a function firebaseuncaught typeerror 3a db getcollectionnames is not a functionuncaught typeerror 3a db collection 28 29 doc 28 29 then is not a functiontypeerror db collection is not a function v5 1typeerror 3a db collections is not a functiondb collection 28 29 doc 28 29 collection 28 29 set is not a functiontypeerror 3a db collection is not a function in firebasetypeerror 3a db collection 28 29 doc 28 29 collection 28 29 set is not a function default database 28 29 collection is not a functiondb collection is not a function reactdb collection is not a function typesctipttypeerror 3a client db 28 29 collection 28 29 then is not a functiondb collection is not a functionuncaught typeerror 3a database collection is not a functiontypeerror 3a db collection is not a functionstore js 3f3bf3 3a22 uncaught typeerror 3a database collection is not a function db collection is not a functiontypeerror db collection is not a functiontypeerror 3a db collectionnames is not a function firebase db collection is not a functiondb collection 28 29 is not a functionunhandled rejection 28typeerror 29 3a db collection is not a functiondb collection is not a function db collection is not a functiontypeerror 3a database collection 28 29 set is not a function at onfinish