Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I tried running this but I couldn't #17

Open
ch-hristov opened this issue Jun 13, 2021 · 1 comment
Open

I tried running this but I couldn't #17

ch-hristov opened this issue Jun 13, 2021 · 1 comment

Comments

@ch-hristov
Copy link

ch-hristov commented Jun 13, 2021

Here's the errors I get

./node_modules/ngx-filemanager-client-firebase/__ivy_ngcc__/fesm2015/ngx-filemanager-client-firebase.js:6767:12-23 - Error: export 'apps' (imported as 'apps') was not found in 'firebase/app' (possible exports: default)

./node_modules/ngx-filemanager-client-firebase/__ivy_ngcc__/fesm2015/ngx-filemanager-client-firebase.js:6768:18-25 - Error: export 'apps' (imported as 'apps') was not found in 'firebase/app' (possible exports: default)

My function index.js:


const functions = require("firebase-functions");
const admin = require("firebase-admin");
const express = require("express");
const cors = require("cors");
const fs = require("fs");
const app = express();

admin.initializeApp(functions.config().firebase);
const db = admin.firestore();
const production = process.env.FUNCTIONS_EMULATOR === true;

const ngx = require("ngx-filemanager-api-firebase/public_api");
exports.files_endpoint = functions.https.onRequest(
  ngx.FileManagerEndpointExpress(admin.storage())
);

Dependencies:

  "dependencies": {
    "@angular/animations": "~12.0.2",
    "@angular/cdk": "^12.0.4",
    "@angular/common": "~12.0.2",
    "@angular/compiler": "~12.0.2",
    "@angular/core": "~12.0.2",
    "@angular/fire": "^6.1.5",
    "@angular/forms": "~12.0.2",
    "@angular/material": "^12.0.4",
    "@angular/platform-browser": "~12.0.2",
    "@angular/platform-browser-dynamic": "~12.0.2",
    "@angular/router": "~12.0.2",
    "@firebase/firestore": "^2.3.6",
    "firebase": "^8.6.7",
    "ngx-filemanager-client-firebase": "^10.0.5",
    "rxjs": "~6.6.0",
    "tslib": "^2.1.0",
    "zone.js": "~0.11.4"
  },

@benwinding
Copy link
Owner

Hi @ch-hristov,
Looks like it could be the options, try this small change and see if that works:

const ngx = require("ngx-filemanager-api-firebase/public_api");
exports.files_endpoint = functions.https.onRequest(
-  ngx.FileManagerEndpointExpress(admin.storage())
+  ngx.FileManagerEndpointExpress({storage: admin.storage()})
);

Cheers,
Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants