我试图从GCP部署'hello-World'节点示例到Google App Engine。将节点应用程序部署到GAE:找不到模块'v8-compile-cache'
而且我遵循快速入门页面上的所有步骤。 (克隆git仓库并在hello-world目录中运行npm install) 而且在我的本地机器上,一切正常。
但每次我尝试执行gcloud应用程序部署我得到以下错误:
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/[email protected]:926dc1a14e6f7eb5b3462b5c1d491aa6c73090291167ac2bf181c026b05f19da" failed: exit status 1
ERROR: (gcloud.app.deploy) Error Response: [2] Build failed; check build logs for details
但我敢肯定,V8编译缓存安装(如果我跑NPM LS我可以看到正确的模块)
有谁知道如何解决这个问题?
这似乎是App Engine Flexible环境使用的最近更新的Base Nodejs映像的问题。 [一个公开的问题已被提交追踪此](https://issuetracker.google.com/issues/37978206)。我建议您主演此问题以获取更新。 – Nicholas