Thanks @Manuel for looking into it. Here is the configurations and error
Server.js:
> const express = require('express');
> const ParseServer = require('parse-server').ParseServer;
> const http = require('http');
> const cors = require('cors');
> const firebaseAuthAdapter = require('parse-server-firebase-auth-adapter');
>
> class Server {
> constructor(config) {
> this.databaseUri = config.databaseUri;
> this.cloudCodeMain = config.cloudCodeMain;
> this.appId = config.appId;
> this.clientKey = config.clientKey;
> this.masterKey = config.masterKey;
> this.serverURL = config.serverURL;
> this.mountPath = config.mountPath;
> this.cacheRedisURL = config.cacheRedisURL;
> this.liveQueryRedisURL = config.liveQueryRedisURL;
> this.liveQueryClassNames = config.liveQueryClassNames;
> this.liveQueryMountPath = config.liveQueryMountPath;
> this.gcsProjectId = config.gcsProjectId;
> this.gcsBucket = config.gcsBucket;
> }
>
> run(port, mountPath, enableLiveQuery) {
> const app = express();
> app.use(cors());
> const api = new ParseServer({
> databaseURI: this.databaseUri,
> cloud: this.cloudCodeMain,
> appId: this.appId,
> clientKey: this.clientKey,
> masterKey: this.masterKey,
> serverURL: this.serverURL,
> liveQuery: {
> classNames: this.liveQueryClassNames,
> redisURL: this.liveQueryRedisURL
> },
> filesAdapter : {
> module: "@parse/gcs-files-adapter",
> options: {
> projectId: this.gcsProjectId,
> bucket: this.gcsBucket
> }
> },
> auth: {
> firebase: firebaseAuthAdapter
> }
> });
>
> app.use(mountPath, api);
>
> const httpServer = http.createServer(app);
> httpServer.listen(port,()=>{
> console.log('server running on port ' + port);
> });
> if (enableLiveQuery) {
>
> ParseServer.createLiveQueryServer(httpServer, {
> appId: this.appId,
> masterKey: this.masterKey,
> serverURL: this.serverURL,
> redisURL: this.liveQueryRedisURL,
> });
> }
> }
> }
Error log:
2021-04-07 14:02:03.029 PDT error: Uncaught internal server error. Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined. {“stack”:“TypeError: Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined.\n at Object.getValidatorForProvider (/usr/src/app/node_modules/parse-server/lib/Adapters/Auth/index.js:159:7)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:357:58\n at Array.map ()\n at RestWrite.handleAuthDataValidation (/usr/src/app/node_modules/parse-server/lib/RestWrite.js:352:45)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:498:17\n at processTicksAndRejections (internal/process/task_queues.js:93:5)”}
2021-04-07 14:02:03.035 PDT TypeError: Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined. at Object.getValidatorForProvider (/usr/src/app/node_modules/parse-server/lib/Adapters/Auth/index.js:159:7)
2021-04-07 14:02:03.035 PDT at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:357:58
2021-04-07 14:02:03.035 PDT at Array.map ()
2021-04-07 14:02:03.035 PDT at RestWrite.handleAuthDataValidation (/usr/src/app/node_modules/parse-server/lib/RestWrite.js:352:45)
2021-04-07 14:02:03.035 PDT at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:498:17
2021-04-07 14:02:03.035 PDT at processTicksAndRejections (internal/process/task_queues.js:93:5)