title: App deploy fails on GCP App Engine (GAE) flexible when specifying engines.node version
body: <pre><code>gcloud --project my-project-id app deploy app.yaml
  </code></pre>
  <p>fails on GAE Flex when I specify a engines.node version in package.json
  but succeeds when I remove it from the package.json, which is contradictory to the <a href="https://cloud.google.com/appengine/docs/flexible/nodejs/runtime" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/flexible/nodejs/runtime</a> documentation.</p>
  <p>I have specified</p>
  <pre><code>&quot;engines&quot;: {
      &quot;node&quot;: &quot;16.x&quot;
    }
  </code></pre>
  <p>in my package.json</p>
  <p>The error I ultimately get is:</p>
  <pre><code>ERROR: gcloud crashed (IOError): [Errno 11] Resource temporarily unavailable
  </code></pre>
  <p>It seems this error is transient as on vary rare occasions in the past 24 hours, the app deploy succeeded.</p>
  <p>Google folks, can you confirm the problem is on your side ?
  I am deploying on GAE Flex in asia-southeast2-a (Jakarta)</p>
  <p>Thanks</p>
  <p>Below a more complete log trace</p>
  <pre><code>BUILD
  Starting Step #0
  Step #0: Pulling image: gcr.io/gcp-runtimes/nodejs/gen-dockerfile@sha256:770f37e7042652138c7dac203fc35ef0218002515ddd9f311db1c6c54d6816aa
  Step #0: gcr.io/gcp-runtimes/nodejs/gen-dockerfile@sha256:770f37e7042652138c7dac203fc35ef0218002515ddd9f311db1c6c54d6816aa: Pulling from gcp-runtimes/nodejs/gen-dockerfile
  Step #0: Digest: sha256:770f37e7042652138c7dac203fc35ef0218002515ddd9f311db1c6c54d6816aa
  Step #0: Status: Downloaded newer image for gcr.io/gcp-runtimes/nodejs/gen-dockerfile@sha256:770f37e7042652138c7dac203fc35ef0218002515ddd9f311db1c6c54d6816aa
  Step #0: gcr.io/gcp-runtimes/nodejs/gen-dockerfile@sha256:770f37e7042652138c7dac203fc35ef0218002515ddd9f311db1c6c54d6816aa
  Step #0: Checking for Node.js.
  Finished Step #0
  Starting Step #1
  Step #1: Already have image (with digest): gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870
  Step #1: INFO[0000] Removing ignored files from build context: [node_modules .dockerignore Dockerfile npm-debug.log yarn-error.log .git .hg .svn app.yaml] 
  Step #1: INFO[0000] Downloading base image gcr.io/google-appengine/nodejs@sha256:721ce182842495a610589261688f1abc1801c915a7e24880fa15af9e9d725459 
  Step #1: INFO[0017] Taking snapshot of full filesystem...        
  Step #1: INFO[0026] Using files from context: [/workspace]       
  Step #1: INFO[0026] COPY . /app/                                 
  Step #1: INFO[0026] Taking snapshot of files...                  
  Step #1: INFO[0026] RUN /usr/local/bin/install_node '16.x'       
  Step #1: INFO[0026] cmd: /bin/sh                                 
  Step #1: INFO[0026] args: [-c /usr/local/bin/install_node '16.x'] 
  Step #1:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  Step #1:                                  Dload  Upload   Total   Spent    Left  Speed
  100 30.8M  100 30.8M    0     0  68.9M      0 --:--:-- --:--:-- --:--:-- 68.9M
  Step #1:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  Step #1:                                  Dload  Upload   Total   Spent    Left  Speed
  100  4035  100  4035    0     0  35238      0 --:--:-- --:--:-- --:--:-- 35394
  Step #1: node-v16.13.0-linux-x64.tar.gz: OK
  Step #1: Installed Node.js v16.13.0
  Step #1: INFO[0028] Taking snapshot of full filesystem...        
  Step #1: INFO[0030] Adding whiteout for /nodejs/lib/node_modules/npm/node_modules/npm-install-checks/CHANGELOG.md 
  Step #1: INFO[0030] Adding whiteout for /nodejs/lib/node_modules/npm/node_modules/os-tmpdir 
  Step #1: INFO[0030] Adding whiteout for /nodejs/lib/node_modules/npm/node_modules/npmlog/CHANGELOG.md 
  Step #1: INFO[0030] Adding whiteout for /nodejs/lib/node_modules/npm/node_modules/lodash.uniq 
  (...)
  ERROR: gcloud crashed (IOError): [Errno 11] Resource temporarily unavailable
  </code></pre>
  <p>Thanks</p>
  <p>[Update] I have upgrade the gcloud-sdk and the error message is a little different now, I get a</p>
  <p><strong>[Errno 11] write could not complete without blocking</strong></p>
  <p>in the middle of the long logging stream generated by the gcloud app deploy command.</p>
  <p>Following the advise of other developers (related to python lib issues, <a href="https://stackoverflow.com/questions/54185874/logging-chokes-on-blockingioerror-write-could-not-complete-without-blocking">link</a> I found a workaround by adding the <code>--no-user-output-enabled</code> flag to the gcloud app deploy command. This prevents the error from happening.</p>
  <p>But this is a temp workaround and I hope the GCP team will fix the issue in the CLI library.</p>