Repository navigation
App Engine deployment issue with grpc and nodejs v6.2.0 #1347
Description
Activity
@jmdobry @jonparrott do you have any ideas?
- addedtype: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
on May 31, 2016 Hey guys, just wondering if you've run into this situation before and if a best practice has emerged for how to handle it? Thanks!
I have never encountered this with GAE. As far as I know,
npm install --update-binaryshould have worked. Pinging @JustinBeckwithI can't find any documentation on "npm install --update-binary" - so I have no idea what that really is scratches head.
Also - if you are using the default deploy path - we don't cache binaries or packages in between deploys. We do no caching, so you get new binaries every time.
Ok, I finally deployed to GAE successfully.
I used Dockerfile base and update it like this :
- change node version to 6.2.0
- remove semver installation and the node install script
- add after https://github.com/GoogleCloudPlatform/nodejs-docker/blob/master/base/Dockerfile#L21:
ADD package.json /app/ RUN npm install ADD . /appInteresting, have you tried adding
"engines": { "node": "6.2.0" }to yourpackage.jsoninstead?I did, and here is
app.yamlruntime: custom # or nodejs without Dockerfile... vm: true threadsafe: true automatic_scaling: min_num_instances: 4 max_num_instances: 80 cool_down_period_sec: 60 cpu_utilization: target_utilization: 0.8 resources: cpu: 1 memory_gb: 1.3 disk_size_gb: 10 health_check: enable_health_check: True check_interval_sec: 5 timeout_sec: 4 unhealthy_threshold: 2 healthy_threshold: 2 restart_threshold: 60 beta_settings: cloud_sql_instances: projectname:zone:instanceid service_account_scopes: > https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/pubsubHmm, were you ever able to try
npm install --update-binary? One way to do that would be to add"postinstall": "npm install --update-binary"to thescriptsin yourpackage.json. Now, was the original deployment itself failing, or was it deploying and the app failing to start? The "app unhealthy" error would indicated that the initialnpm installsucceeded, but that the app failed to start, which is what I suspect since you were able to take a screenshot of the logs in the Cloud Console.@jduval can you share your package.json? We're kinda guessing here.
@jmdobry I just try to add and deploy with
"postinstall": "npm install --update-binary"andruntime: nodejs, but it fails at building.
Otherwise it was deploying but the app failing to start. I could see the GAE version with instances and browsed logs.@JustinBeckwith here is my package.json
{ "name": "projectname", "version": "1.0.0", "description": "project desc", "main": "app.js", "engines": { "node": "6.2.0" }, "dependencies": { "async": "^1.5.2", "body-parser": "^1.15.1", "bunyan": "^1.8.1", "common-errors": "^0.5.1", "cors": "^2.7.1", "express": "^4.13.3", "express-domain": "^1.0.5", "express-winston": "^1.3.1", "gcloud": "^0.34.0", "googleapis": "^6.1.0", "helmet": "^2.0.0", "jsonwebtoken": "^6.2.0", "lodash": "^4.12.0", "memcached": "^2.2.2", "morgan": "^1.6.1", "mysql": "^2.10.2", "prompt": "^1.0.0", "require-dir": "^0.3.0", "winston": "^2.2.0" }, "devDependencies": { "supertest": "^1.2.0", "tap-spec": "^4.1.1", "tape": "^4.5.1" }, "scripts": { "start": "node app.js", "deploy": "gcloud preview app deploy app.yaml --no-promote --project=projectid", "test": "./node_modules/.bin/tape tests/*.js | ./node_modules/.bin/tap-spec" }, "repository": { "type": "git", "url": "url" }, "author": "", "license": "ISC" }I just tested with your configuration, and it worked.
I used the following to deploy:
app.yaml
runtime: nodejs vm: true manual_scaling: instances: 1
package.json
{ "name": "projectname", "main": "app.js", "engines": { "node": "6.2.0" }, "dependencies": { "async": "^1.5.2", "body-parser": "^1.15.1", "bunyan": "^1.8.1", "common-errors": "^0.5.1", "cors": "^2.7.1", "express": "^4.13.3", "express-domain": "^1.0.5", "express-winston": "^1.3.1", "gcloud": "^0.34.0", "googleapis": "^6.1.0", "helmet": "^2.0.0", "jsonwebtoken": "^6.2.0", "lodash": "^4.12.0", "memcached": "^2.2.2", "morgan": "^1.6.1", "mysql": "^2.10.2", "prompt": "^1.0.0", "require-dir": "^0.3.0", "winston": "^2.2.0" }, "scripts": { "start": "node app.js" } }app.js
require('async'); require('body-parser'); require('bunyan'); require('common-errors'); require('cors'); require('express-domain'); require('express-winston'); require('gcloud'); require('googleapis'); require('helmet'); require('jsonwebtoken'); require('lodash'); require('memcached'); require('morgan'); require('mysql'); require('prompt'); require('require-dir'); require('winston'); var express = require('express'); var app = express(); app.get('*', function (req, res) { res.status(200).send('Ok').end(); }); app.listen(process.env.PORT || 8080);
I try without
threadsafelike you did. Building is OK, but still have this mismatch version issue.Going to close the issue, since this isn't a bug with the code in this repo. But if there are still issues, feel free to keep discussing.
- added a commit that references this issue
on Feb 5, 2026 - added a commit that references this issue
on Feb 17, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 18, 2026
I'm trying to deploy to App Engine with a nodejs runtime. It seems to fail because of a mismatch version of grpc.
I successfully deployed to GAE with a custom runtime with docker which only runs
npm install. I saw from grpc/grpc#6218 that runningnpm install --update-binarymay solves the problem. But I can't figure out to do that.If I'm not mistaken,
gcloud preview app gen-config --customgenerates a Dockerfile from the nodejs runtime base, right ? So I try to add the last command to update binary. But it didn't work.What am I missing ?
Thanks.