firebase / firebase/functions-samples
Write from firebase realtimedb to spreadsheet
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 3.8k
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
### How to reproduce these conditions
I am trying to write from the firebase to the spreadsheet. However, it stops when writing to the spreadsheet.
**Sample name or URL where you found the bug**
https://github.com/firebase/functions-samples/tree/master/google-sheet-sync
**Failing Function code used (including require/import commands at the top)**
appendrecordtospreadsheet
**Steps to set up and reproduce**
I followed the procedure in functions-samples / google-sheet-sync / README.md
**Sample data pasted or attached as JSON (not an image)**
```
{
"name": "google-sheet-sync",
"description": "Syncs new Firebase data to a Google Sheet",
"dependencies": {
"firebase-admin": "^5.10.0",
"firebase-functions": "^1.0.0",
"google-auth-library": "^1.3.1",
"googleapis": "^27.0.0"
},
"devDependencies": {
"eslint": "^4.13.1",
"eslint-plugin-promise": "^3.6.0"
},
"scripts": {
"lint": "./node_modules/.bin/eslint --max-warnings=0 .",
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"private": true
}
```
**Security rules used**
```
{
"rules": {
".read": true,
".write": true
}
}
```
### Debug output

### Expected behavior
Write to spreadsheet from firebase realtimeDB
### Actual behavior
Although writing to firebase is possible, writing to the spreadsheet is a situation where the following error can not be issued. Please help me.
-------------------------------------------------------------------- ------------------------
Function load error: Code in file index.js can not be loaded.
Is there a syntax error in your code?
Detailed stack trace: TypeError: OAuth2Client is not a constructor
???? at Object. (/user_code/index.js:45:30)
-------------------------------------------------------------------- --------------------------
Contributor guide
Assessment
This issue has not been assessed yet.