Attempting to deploy TypeScript onto my FCF isn't working as expected based on the documentation and official Firecasts video. When deploying the default code (helloworld) instead of TypeScript, it deploys a node.js file which is confusing. Below are some JSON files and TS files; please review the generated files.
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "lib",
"sourceMap": true,
"strict": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}
package.json
{
"name": "functions",
"scripts": {
...
},
"engines": {
"node": "8"
},
"main": "lib/index.js",
...
}
index.ts
import * as functions from 'firebase-functions';
// Start writing Firebase Functions
...
export const helloWorld = functions.https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
Upon deploying the code:
...
https://i.sstatic.net/g3yWd.png
Suspecting that the issue lies in the engines section of package.json, unsure of what version number to update it with. Any guidance would be appreciated!