Open SweetmanTech opened 5 years ago
1) clone git repo for firebase/function-samples 2) cd ffmpeg project 3) firebase add 4) firebase deploy 5) ERROR
firebase/function-samples
Sample name or URL where you found the bug https://github.com/firebase/functions-samples/blob/Node-8/ffmpeg-convert-audio/functions/index.js
Failing Function code used (including require/import commands at the top)
const functions = require('firebase-functions'); const gcs = require('@google-cloud/storage')(); const path = require('path'); const os = require('os'); const fs = require('fs'); const ffmpeg = require('fluent-ffmpeg'); const ffmpeg_static = require('ffmpeg-static');
Steps to set up and reproduce
Sample data pasted or attached as JSON (not an image)
Security rules used
Errors in the console logs
Screenshots
Deploy successfully to Firebase Cloud Functions!
ERROR - module import fails for firebase cloud storage
You can check issue #472
TLDR - change lines 19 & 57 with:
const gcs = require('@google-cloud/storage'); const bucket = new gcs.Storage().bucket(fileBucket);
How to reproduce these conditions
1) clone git repo for
firebase/function-samples
2) cd ffmpeg project 3) firebase add 4) firebase deploy 5) ERRORSample name or URL where you found the bug https://github.com/firebase/functions-samples/blob/Node-8/ffmpeg-convert-audio/functions/index.js
Failing Function code used (including require/import commands at the top)
Steps to set up and reproduce
1) clone git repo for
firebase/function-samples
2) cd ffmpeg project 3) firebase add 4) firebase deploy 5) ERRORSample data pasted or attached as JSON (not an image)
Security rules used
Debug output
Errors in the console logs
Screenshots
Expected behavior
Deploy successfully to Firebase Cloud Functions!
Actual behavior
ERROR - module import fails for firebase cloud storage