简体   繁体   English

Google App Engine - 引擎“节点”与此模块不兼容

[英]Google App Engine - The engine "node" is incompatible with this module

This questions has been asked many times already, and I checked all the answers but none of them helped me.这个问题已经被问过很多次了,我检查了所有的答案,但没有一个对我有帮助。

I'm trying to deploy a NodeJs app to GAE using a app.yml file.我正在尝试使用 app.yml 文件将 NodeJs 应用程序部署到 GAE。 It was working perfectly until my last Github PR on it where I upgraded some nodes modules.它运行良好,直到我最后一次 Github PR 在它上面我升级了一些节点模块。

Now I'm getting the Error The engine "node" is incompatible with this module. Expected version "16.xx". Got "12.19.0"现在我收到错误The engine "node" is incompatible with this module. Expected version "16.xx". Got "12.19.0" The engine "node" is incompatible with this module. Expected version "16.xx". Got "12.19.0" The engine "node" is incompatible with this module. Expected version "16.xx". Got "12.19.0" . The engine "node" is incompatible with this module. Expected version "16.xx". Got "12.19.0"

As you can see I'm up to date on my computer.正如你所看到的,我在我的电脑上是最新的。 I also removed and install Node, Npm and Yarn tonight just to be sure.为了确定,我今晚还删除并安装了 Node、Npm 和 Yarn。

node -v
v16.15.0
npm -v
8.5.5
yarn -v
1.22.18

I tried deploying the app with a specific node version on my packages.json but with or without it's not working.我尝试在我的 packages.json 上部署具有特定节点版本的应用程序,但不管有没有它都不起作用。

  "engines": {
    "node": "16.x.x"
  },

I also tried to remove the cache on GAE using this, without no effect.我还尝试使用此方法删除 GAE 上的缓存,但没有任何效果。

default_expiration: '0d 0h'

On my app.yml I'm using nodejs en Env: flex :在我的 app.yml 上,我使用的是nodejs en Env: flex

runtime: nodejs
env: flex

I can't use node16 as I need env: flex .我不能使用node16因为我需要env: flex

Of course I tried to delete the Node_modules and yarn.lock for at least 100 times but still nothing, always the same error.当然,我尝试删除 Node_modules 和 yarn.lock 至少 100 次,但仍然没有,总是同样的错误。

Nothing change on the app.yml file since the last deployment.自上次部署以来,app.yml 文件没有任何变化。 The only thing is that I upgraded some Node Modules.唯一的事情是我升级了一些节点模块。

On the Yarn side I've tried:在纱线方面,我尝试过:

yarn install --force
yarn install --ignore-engines
yarn cache clean --all

But still not working.但仍然无法正常工作。

Any help will be really grateful.任何帮助将不胜感激。

I had the same issue.我遇到过同样的问题。 The error is because the image used by google is fixed to the version 12.19.0, check here for more info.该错误是因为 google 使用的图像已修复为 12.19.0 版本,请查看此处了解更多信息。

My workaround was use a custom image:我的解决方法是使用自定义图像:

  1. Change in the app.yaml file the runtime to custom .app.yaml文件中的运行时更改为custom
runtime: custom
env: flex
...
  1. Create a Dockerfile file with the following content:创建一个Dockerfile文件,内容如下:
FROM gcr.io/google_appengine/nodejs

# Current Node LTS version.
RUN /usr/local/bin/install_node '16.16.0'

RUN npm install --unsafe-perm --global yarn

COPY . /app/

RUN yarn install --production || \
  ((if [ -f yarn-error.log ]; then \
      cat yarn-error.log; \
    fi) && false)
CMD yarn start

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 引擎“节点”与该模块不兼容 - The engine "node" is incompatible with this module firebase 云功能引擎节点与此模块不兼容 - firebase cloud funtions the engine node is incompatible with this module 无法使用npx create-react-app安装react应用。 节点引擎“节点”与此模块不兼容 - Can't install react app using npx create-react-app. Node The engine “node” is incompatible with this module Google App Engine - 节点:找不到模块'firebase-admin' - Google App Engine - Node: Cannot find module 'firebase-admin' google cloud build - functions@:引擎“节点”与此模块不兼容。 预期版本“10” - google cloud build - functions@: The engine "node" is incompatible with this module. Expected version "10" 错误 eslint@5.6.0:引擎“节点”与此模块不兼容。 尝试创建反应应用程序时 - error eslint@5.6.0: The engine "node" is incompatible with this module. when trying to create-react-app 使用 Cloudflare Pages 的 React 应用程序:错误 react-scripts@5.0.0:引擎“节点”与此模块不兼容 - React app using Cloudflare Pages: error react-scripts@5.0.0: The engine "node" is incompatible with this module 错误@quasar/app@3.0.1:部署到Netlify时引擎“node”与此模块不兼容 - error @quasar/app@3.0.1: The engine “node” is incompatible with this module when deploying to Netlify (在Rails上反应)引擎“节点”与此模块不兼容。 预期版本“…” - (React on Rails) The engine “node” is incompatible with this module. Expected version “…” 引擎“节点”与此模块不兼容。 预期版本“7.5.0”。 得到“15.13.0” - The engine "node" is incompatible with this module. Expected version "7.5.0". Got "15.13.0"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM