Diane Kaplan
Diane Kaplan

Reputation: 1708

node.js on google app engine: different version running vs specified in package.json

I have a node application on GAE (Google App Engine) flex environment. In the code, package.json specifies: "node": "8.11.4":

{
  "name": "prismic-universal-app",
  "version": "1.0.0",
  "description": "",
  "main": "public/js/compiled/server.js",
  "engines": {
    "node": "8.11.4"
  },
  "scripts": {
...

But when I open a Cloud Shell window from the google cloud console the project and run 'node --version', I get v8.9.4

Reading through google's documentation, I don't see anything yet about using a different version from what's in package.json. Does anyone know if google has another way to determine what version of node will ultimately be used? Or is there another spot where Node.js version can be set that may be conflicting with package.json?

Upvotes: 0

Views: 335

Answers (1)

Dan Cornilescu
Dan Cornilescu

Reputation: 39824

The Cloud Shell is a GCP product separate from GAE (flexible). It does not execute on your GAE flexible app instance. From Virtual machine instance:

When you start Cloud Shell, it provisions a g1-small Google Compute Engine virtual machine running a Debian-based Linux operating system.

The info you obtained is from that VM.

To check the info on your GAE flexible app instance, you need to connect to it specifically, see Connecting to the instance.

Upvotes: 2

Related Questions