During firebase deploy
in terminal, I get an error on this line:
// index.js in the output folder
const firebase_functions_1 = __importDefault(require("firebase-functions"));
exports.buyUsedServer = firebase_functions_1.default.https.onRequest(express);
// index.ts in the source folder
import firebaseFunctions from 'firebase-functions';
export const buyUsedServer = firebaseFunctions.https.onRequest(express);
//# sourceMappingURL=index.js.map
What is firebaseFunctions (or the default object) causing an issue here?
This is the full stack trace:
i functions: preparing functions directory for uploading...
Error: Error occurred while parsing your function triggers.
TypeError: Cannot read property 'https' of undefined
at Object.<anonymous> (/home/owner/PhpstormProjects/shopify/project/functions/outDir/index.js:170:54)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16)
at /home/owner/.nvm/versions/node/v12.4.0/lib/node_modules/firebase-tools/lib/triggerParser.js:15:15
at Object.<anonymous> (/home/owner/.nvm/versions/node/v12.4.0/lib/node_modules/firebase-tools/lib/triggerParser.js:53:3)
at Module._compile (internal/modules/cjs/loader.js:774:30)