Warning from Firebase CLI deployment: The Node.js 8 runtime has been marked as deprecated and is scheduled to be phased out by 2020-12-05

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!

Answer №1

The current version of Node 8 is no longer supported and will be phased out in the future. To learn more about this change, please click on the link provided in the warning message. It is recommended to start planning your migration to Node.js 10 by following this guide. Additionally, ensure that you have specified the following configuration in your package.json file:

  "engines": {
    "node": "10"
  },

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Implementing Limited Results in Redis FT.SEARCH with TypeScript

Snippet of code: client.ft.SEARCH('license-index-json',"@\\$\\" + ".reservedForApplicationName:GSTest",{ LIMIT: { from: 0, to: 1 } }) Error message: An error occurred when trying t ...

What is the proper way to access and modify the child component within a parent component?

I am working with nested components as shown below: app.parent.component > app.container.component > app.containeritem.component Here is an example: app.parent.component import ... @Component({ selector:'parent', template: &apos ...

The issue with Firebase's real-time database is that data constantly gets overwritten within a single node

Having an issue with writing data to my Firebase realtime database. Below is the code I am using: firebase.database().ref("ac/0/").set(null); firebase.database().ref("ac/0/").once('value', function(snapshot){ for(var i=0; ...

The use of Next.js v12 middleware is incompatible with both node-fetch and axios

I am facing an issue while developing a middleware that fetches user data from an external endpoint using Axios. Surprisingly, Axios is not functioning properly within the middleware. Below is the error message I encountered when using node-fetch: Module b ...

Use Angular2 to showcase the selected image as the main one when the user clicks on the

I'm working on creating a product thumbnail gallery, and I'd like the main image to be displayed when the user clicks on a thumbnail. I am using Angular for this project, although I am still learning my way around the framework. product.html &l ...

Difficulty encountered while managing dropdown functionality in Protractor using TypeScript

I'm encountering some difficulties when it comes to selecting a dropdown in Protractor. Here's the structure of my DOM: https://i.stack.imgur.com/qK8sT.png This is the XPath I'm using to select the dropdown with the value "Yes": //label[ ...

Are all components in Next.js considered client components by default?

I have created a Next.js app using the app folder and integrated the Next Auth library. To ensure that each page has access to the session, I decided to wrap the entire application in a SessionProvider. However, this led to the necessity of adding the &apo ...

NestJS Bull queues - Failing to secure job completion with a lock

I am currently utilizing Bull in combination with NestJS to manage a jobs queue. Within the process handler, I aim to designate a job as failed instead of completed. However, it appears - after carefully reviewing the documentation as well - that the Job#m ...

What is the best way to prevent event propagation in d3 with TypeScript?

When working with JavaScript, I often use the following code to prevent event propagation when dragging something. var drag = d3.behavior.drag() .origin(function(d) { return d; }) .on('dragstart', function(e) { d3.event.sourceEvent ...

How can I verify the validity of a regular expression in Typescript without encountering a syntax error?

I am facing an issue with my code where I load a set of regular expressions from an external source. My goal is to determine if a given string is a valid regex without causing the application to crash due to a syntax error. Despite trying to use try/catch ...

Translate Firestore value updates into a TypeScript object

Here are the interfaces I'm working with: interface Item { data: string } interface Test { item: Item url: string } In Firestore, my data is stored in the following format: Collection Tests id: { item: { data: " ...

Transforming data objects into simplified interfaces using Typescript

Issue Explanation Current data: { "field1": "value", "field2": 3, "field3": true, "extraField": "toRemove" } An interface is defined as follows: export interface MyInterface { field1: string; field2: number; field3: boolean; } Objective ...

Backend server encountered an issue with processing punycode

[ALERT] 18:13:52 Server Restarting Prompt: C:\Code\MERN_Projects\podify_app\server\src\db\index.ts has been altered (node:22692) [DEP0040] DeprecationWarning: The punycode module is outdated. Consider utilizing a modern a ...

What are the steps for creating a custom repository with TypeORM (MongoDB) in NestJS?

One query that arises is regarding the @EntityRepository decorator becoming deprecated in typeorm@^0.3.6. What is now the recommended or TypeScript-friendly approach to creating a custom repository for an entity in NestJS? Previously, a custom repository w ...

Filtering database results from an Angular component

I am currently working on an Angular component and I have a result variable in the .ts file that stores data retrieved from the database. My goal is to filter this result variable to display only 20 records and sort them by date either in ascending or de ...

Is there a way to access a child component's method from the parent component using ref in Vue3?

I am encountering an issue while attempting to call the child method from the parent component in vue3 using the ref method. Unfortunately, an error is being thrown. Uncaught TypeError: addNewPaper.value?.savePaper is not a function Displayed below is m ...

Waiting for an HTTP request to complete during server-side rendering with Angular 5 Universal

Currently, I am working on an Angular 5 application that is being served using ngExpressEngine (built off the Angular Universal starter project). Within my app, there is a component that makes an HTTP request to fetch some data for display purposes. Ever ...

Having difficulty transferring data between components using @Input syntax

I am having trouble passing the FailedProductId from Component1 to Component2 using @Input. Below is the code snippet: export class Component1 implements OnInit { public FailedProductId="produt"; constructor(private employeeService: ProductService) {} ...

Sending notifications to a large user base of over 5000 individuals through Firebase: a step-by-step guide

Seeking assistance in sending notifications to all users within a Laravel framework system. Concerned about potential limitations on the number of tokens for notifications. Looking for guidance on how to send notifications to a large user base exceeding ...

Make the download window appear automatically when downloading a file

How can I use JavaScript/TypeScript to prompt the browser to open the download window? My goal is to give users the ability to rename the file and select the download folder, as most downloads are saved directly in the default location. This is how I curr ...