gpt4 book ai didi

node.js - 将 Node 应用程序部署到 GAE : Cannot find module 'v8-compile-cache'

转载 作者:太空宇宙 更新时间:2023-11-03 22:27:23 25 4
gpt4 key购买 nike

我尝试将“hello-World” Node 示例从 GCP 部署到 Google App Engine。

我按照快速入门页面上的所有步骤进行操作。 (克隆 git 存储库并在 hello-world 目录中运行 npm install)在我的本地机器上一切正常。

但是每次我尝试运行 gcloud app deploy 时都会收到以下错误:

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

但我很确定 v8-compile-cache 已安装(如果我运行 npm ls 我可以看到正确的模块)

有谁知道如何解决这个问题吗?

最佳答案

这可以帮助你

npm i v8-compile-cache

关于node.js - 将 Node 应用程序部署到 GAE : Cannot find module 'v8-compile-cache' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43787834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com