1

I'm having trouble deploying my node.js app to GAE.

It's a simple app that connects to my Firebase and updates a value. Just to get started.

Whenever I try to deploy the app it fails. Runs fine locally.

I deleted my project and started a fresh one, and deployed the default 'hello-world' app after downloading the zip and it worked fine.

I installed firebase on the project via the cloud shell.

Added

var Firebase = require("firebase"); 

to the app.js file and it no longer deploys.

I am new to GAE and cannot understand why it won't deploy. I feel like if i'm having trouble just including firebase in an app, I'm in for a tough time.

This is the error I get. The only think I have added to the original hello-world app is the firebase dependency. I remove that and it deploys fine again.

Updating service [default]...failed. ERROR: (gcloud.preview.app.deploy) Error Response: [13] Timed out when starting VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still deploying).

Any help would be greatly appreciated.

1
  • 2
    Can't say I'm familiar with node.js but if you post your package.json it might help others. Commented May 3, 2016 at 12:51

3 Answers 3

1

I fixed the issue by installing the firebase npm on my local machine again. I noticed when I was installing it on the server (even with --save) it wasn't updating the package.json file for some reason and it hadn't updated it locally either. But it still ran on my local machine without the package mentioning a firebase dependency. Not sure why that would be the case.

It seems to be working now.

Sign up to request clarification or add additional context in comments.

Comments

0

Before you can require the "firebase" package you need to install it.

To install the latest version of the package using the command line:

  1. Navigate to the project root directory
  2. Run npm install --save firebase

You will now have Firebase, and all the packages that it depends on, installed in your app.

The --save argument makes the command save the package installation configuration to the package.json file, so that the package is installed when you run the npm install command to set up the project on another computer, or when your app is deployed to Google App Engine.

1 Comment

He said I installed firebase on the project via the cloud shell.
0

You can check the logs for error. To check it goto your project at google console (console.cloud.google.com) and then Menu-> Logs.

Usually this error comes when app couldn't start while deploying. 1st check if the app local environment. If it is working fine then check if any environment variable is required to set and not set properly on cloud.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.