Experiencing issues updating firebase functions?

I'm encountering an error while trying to update my firebase functions:

C:\Users\MYName\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\@grpc\grpc-js\build\src\index.js:47
        throw new Error(`@grpc/grpc-js only works on Node ${supportedNodeVersions}`);
        ^

    Error: @grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0
        at Object.<anonymous> (C:\Users\Bhaskar\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\@grpc\grpc-js\build\src\index.js:47:11)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (C:\Users\Bhaskar\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\google-gax\build\src\grpc.js:37:14)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)

Could someone assist me in resolving this issue?

Answer №1

The provided message states:

Issue: @grpc/grpc-js is only compatible with Node versions ^8.13.0 || >=10.10.0

This suggests that you need to switch to one of the recommended Node versions on your personal computer. Consider installing Node 10 instead of your current version. Confirm by running node --version.

Answer №2

Encountered an issue where firebase attempted to update all functions, resulting in a series of "Error Failed to update function" messages for each cloud function.

Resolved the problem by reverting to a previous version of my package.json folder. The root cause was unnecessary installation of @firebase/app and changes in versions of firebase, firebase-admin, and firebase-functions.

Successfully functioning package.json version:

  "dependencies": {
    "@azure/msal-node": "^1.3.0",
    "@firebase/firestore": "^3.0.0",
    "@types/bn.js": "^5.1.0",
    "@types/json-bigint": "^1.0.1",
    "@types/uuid": "^8.3.1",
    "axios": "^0.21.1",
    "cors": "^2.8.5",
    "firebase": "^8.10.0",
    "firebase-admin": "^9.8.0",
    "firebase-functions": "^3.15.7",
    "uuid": "^8.3.2",
    "web3-utils": "^1.5.2"
  },

Problematic package.json version:

  "dependencies": {
    "@azure/msal-node": "^1.3.0",
    "@firebase/app": "^0.7.5",
    "@firebase/firestore": "^3.0.0",
    "@types/bn.js": "^5.1.0",
    "@types/json-bigint": "^1.0.1",
    "@types/uuid": "^8.3.1",
    "axios": "^0.21.1",
    "cors": "^2.8.5",
    "firebase": "^9.2.0",
    "firebase-admin": "^10.0.0",
    "firebase-functions": "^3.15.4",
    "uuid": "^8.3.2",
    "web3-utils": "^1.5.2"
  },

Comparison screenshot of the two commits. Reverting to the previous (red) version resolved the updating issue.

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

How to initiate a refresh in a React.js component?

I created a basic todo app using React, TypeScript, and Node. Below is the main component: import * as React from "react" import {forwardRef, useCallback, useEffect} from "react" import {ITodo} from "../types/type.todo" import ...

Is it possible to import a package from a monorepo located in a different repository?

Currently, I have successfully set up a create-react-app and a storybook packages in a lerna monorepo. My goal now is to utilize the components created within the storybook package in an entirely fresh repository. I attempted using npm install git://githu ...

Halt the execution of any additional code

I have a favor to ask: Character.count({'character.ownerid': msg.author.id}, function (err, count) { if (err) { throw err; } if (count > 3) { err.message = 'Exceeded character limit'; //create error ...

What is the best method for displaying an image from Firebase storage on my NextJs webpage?

I'm running into an issue with fetching an image from Firebase storage to my NextJs website as a beginner. After trying multiple solutions without success, I keep encountering the error message: "Image is missing required "src" propert ...

Safari exceeded the maximum call stack size limit error

Has anyone else encountered the "Maximum call stack size exceeded" error when trying to fetch data from Firebase in Next.js? It seems to only occur on Safari based browsers, as the code works perfectly fine in Chrome based browsers under the same conditi ...

The import of type cannot be done within paths in tsconfig

Currently, I am tackling a server side project utilizing TypeScript. In this context, I have established various types in ooo.d.ts and configured the paths within tsconfig.json. However, upon attempting to import the specified type, an error is being displ ...

Is it possible for a mobile device to play .ogg videos?

Currently, I am setting up a server to stream videos using HTML. So far, I have tested playing both .mp4 and .ogg video formats on my computer successfully. However, when I attempted to play the same videos on a mobile device, only the .mp4 file showed u ...

Issue encountered during npm installation (fatal error: invalid object f18e4d058698a689943db9cb41f767efbc2c85ed)

Recently I obtained code from a repository on GitHub and attempted to install it. However, encountered errors during the installation process: terrylai@Terrys-MacBook-Pro:~/copay$ npm install npm ERR! git rev-list -n1 f18e4d058698a689943db9cb41f767efbc2c ...

Is it possible to execute Cypress tests on the Front-End of a Docker-hosted Database using a GitLab CI/CD pipeline?

I am currently working on my first web application using Vue.js and Docker to virtualize my server-side MySQL database for cloud save functionality. To test the front end, I am utilizing Cypress for E2E testing, including interactions with the database thr ...

What is the process for changing a value in a mongoose document?

Recently, I encountered a challenge in modifying someone else's code. Instead of deleting a MongoDB document, my task is to update it. Let's take a look at the original code snippet: const docs = await docsModel.find({}); for (const doc of doc ...

What is the typical number of open CLI terminals for a regular workflow?

After experimenting with Gulp, Bower, ExpressJS, and Jade, I have settled on a workflow that I am eager to switch to. The only issue I am facing is the need to have two terminals open simultaneously in order to use this workflow efficiently. One terminal ...

The validation process for Joi arrays encountered a challenge with converting the input to an array

Currently, I am utilizing the Joi library for schema validation. My aim is to validate an array of objects using Joi. Below is the code snippet I am working with: const joi = require("joi"); function validateUser(user) { let phone = joi.object().keys({ ...

Issue encountered: Cannot locate module: Error message - Unable to find 'stream' in 'C:devjszip-test ode_modulesjsziplib' folder

I am encountering an issue in my angular 7 application while using jszip v3.2.1. During the project build process (e.g., running npm start), I receive the following error message: ERROR in ./node_modules/jszip/lib/readable-stream-browser.js Module not fo ...

Retrieve and showcase every image belonging to a specific user using Node.js and EJS, pulling the data

As a newcomer to Node.js, I am currently working on displaying all the images of a logged-in user from my database onto my EJS file. I have written the necessary code, but I am facing an issue with properly displaying all the images. I have attempted to us ...

Guide on Utilizing Forever Alongside Express for Continuous Operation of a NodeJS Server

Currently, I have an Express NodeJS server that I personally initiate via the terminal with npm start in the root directory of my project. To ensure consistent uptime, I opted to install the Forever package globally. However, when I try to run Forever on m ...

Struggling with incorporating ES6 syntax into a Node Typescript application

I encountered an error while trying to import a module Below is the code snippet: import * as express from 'express'; export class Server { app: express.Application constructor() { const port = 3000 || process.env.PORT ...

Effective method for obtaining the URL from a Node.js application

I'm curious if there is a method to extract a url such as http://whatever:3000/somemethod/val1/val2/val3 Is there an alternative to using .split after obtaining the path name? For example, I attempted to acquire /somemethod/val1/val2/val3 and then ...

The functionality of Node.js middleware is not functioning correctly

My module contains Routes, and I want to verify access before allowing users to proceed. Within the Routes module, there are two routes and two access-check functions that I want to use as middlewares: const checkUser = (req, res, next) => { if (!us ...

Issue with accessing a nested key in Mongoose and Express resulting in undefined value

I am facing an issue with my Mongoose Schema where I can display the result array, but not its individual contents. { "_id": { "$oid": "5cfa15e123d2f414da760635" }, "objectID": 21078, "cars_getroute": "volvo-123-gt-coach-1967-1968" ...

PostMan gives me an error when I attempt to send an image file to NodeJS using multer (req.file is undefined)

After encountering issues with saving image files to the server using multer-s3, I attempted to use multer and s3Client instead. Unfortunately, I faced similar challenges as req.file or req.files from the multer-s3 middleware continued to return undefined. ...