TypeError: database.collection(...).set is not a function at onFinish
db.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.
Replace
db.collection("users").set({
points: 0,
CurrentLevel: 0
})
with
db.collection("users").add({
points: 0,
CurrentLevel: 0
})
And I think that should solve your problem
Also in JavaScript:
- formatDoubl js
- javascript redirect button
- debugger js
- after load page jquery
- javascript palindrome
- how to clear pod cache in react native
- react add inline styles in react
- jquery wait for all ajax requests to complete
- js yield*
- react native ellipsis
- how to hide header in react navigation
- localForage
- javascript json to array
- defoult function atributes
- vue store access state in actions
- how to add objects in array in javascript
- javascript toggle variable
- jquery each
- add object to array react hook
- $(getJson) returning error
- remove duplicate objects from array javascript
- Javascript function to get the difference between two numbers
- nodejs get current directory
- sequelize where more than