Error in installing node js module firebase-admin

Hi,

I am trying to install firebase-admin on my api-proxy but i am getting an error:

"An internal error has occurred. Please retry your request."


following is my package.json:

{
  "name": "FireBaseSetData",
  "dependencies": {
    "express": "",
    "firebase-admin": "^5.13.1"
  }
}

I have made the firebase-admin :"" empty as well but still getting this error.

and following is the screenshot of error:

7187-apigee-firebase.jpg

Regards,

Fahad Tanwir

0 5 1,045
5 REPLIES 5

Hi @Fahad Tanwir, Firebase-Admin requires Node.js 4.0+ and Apigee's nodejs is the Trireme runtime is based on node 0.10.32 version. Maybe this is the reason it is giving an internal error while installing.

At the same time this Trireme based nodejs doesnt allow all the node modules.

If you are using new cloud account, then you can try Hosted Target(Beta).

Hosted Targets lets you run Node.js applications in a native runtime environment hosted by Apigee.

More info here,

https://docs.apigee.com/api-platform/hosted-targets/hosted-targets-overview

Migrating an existing Node.js proxy to a Hosted Targets proxy

https://docs.apigee.com/api-platform/hosted-targets/hosted-targets-tutorials#migrating-an-existing-n...

HI @Siddharth Barahalikar

I don't want apigee host and target my local machine.. as it is explained there.

what I want is to install firebase-admin at apigee and configure my firebase there instead of local machine.

is there any way I can do it?

Right now you might have created a nodejs proxy in apigee which has a package.json file.

Now download this proxy to your local machine & make changes to the directories & add files as mentioned in this doc .

Then as shown in the doc, you will be using a apigeetool (nodejs module) to deploy it to your edge organization.

When deployed apigee is going to install all the npm modules mentioned in the package.json

we have created proxy using hosted targets for firebase admin sdk but after deployment we are getting this error :

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>500 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2> 

Is there any other way to using which we can install firebase admin sdk

,

we have created proxy using hosted targets for firebase admin sdk but after deployment we are getting this error :

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>500 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2> 

Is there any other way to using which we can install firebase admin sdk

@Fahad Tanwir

Facing same issue. Kindly let me know if u get any solution. Even using hosted targets i'm unable to get the output