'Deploy Node App to GAE: Cannot find module 'v8-compile-cache'

I tried to deploy the 'hello-World' Node Example from GCP to Google App Engine.

And I followed all the Steps on the Quickstart Page. (Cloning git repository and running npm install in hello-world directory) And on my local machine is everything working.

But everytime I try to run gcloud app deploy i get the following Error:

module.js:471
throw err;
^

Error: Cannot find module 'v8-compile-cache'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/nodejs/lib/node_modules/yarn/bin/yarn.js:25:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
The command '/bin/sh -c yarn install --production ||   ((if [ -f yarn-error.log ]; then       cat yarn-error.log;     fi) && false)' returned a non-zero code: 1
ERROR
ERROR: build step "gcr.io/cloud-builders/docker@sha256:926dc1a14e6f7eb5b3462b5c1d491aa6c73090291167ac2bf181c026b05f19da" failed: exit status 1

ERROR: (gcloud.app.deploy) Error Response: [2] Build failed; check build logs for details

But i am pretty sure that v8-compile-cache is installed (if i run npm ls i can see the correct module)

Does anyone know how to resolve this problem?



Solution 1:[1]

This could assist you

npm i v8-compile-cache

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jakub Kurdziel