简体   繁体   English

google cloud build - functions@:引擎“节点”与此模块不兼容。 预期版本“10”

[英]google cloud build - functions@: The engine "node" is incompatible with this module. Expected version "10"

I'm setting up cloud build trigger, how to set node version properly?我正在设置云构建触发器,如何正确设置节点版本? this is what I get:这就是我得到的:

Already have image (with digest): gcr.io/cloud-builders/yarn yarn install v1.9.4 info No lockfile found.已经有图像(带摘要):gcr.io/cloud-builders/yarn yarn install v1.9.4 info 找不到锁文件。 warning package-lock.json found.警告 package-lock.json 发现。 Your project contains lock files generated by tools other than Yarn.您的项目包含由 Yarn 以外的工具生成的锁定文件。 It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files.建议不要混用package管理器,以免锁文件不同步导致解析不一致。 To clear this warning, remove package-lock.json.要清除此警告,请删除 package-lock.json。 [1/5] Validating package.json... error functions@: The engine "node" is incompatible with this module. [1/5] 验证 package.json...错误函数@:引擎“节点”与此模块不兼容。 Expected version "10".预期版本“10”。 error Found incompatible module info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.错误发现不兼容的模块信息访问https://yarnpkg.com/en/docs/cli/install以获取有关此命令的文档。

package.json: package.json:

"engines": {
  "node": "10"
}

.yaml is: .yaml 是:

steps:
  - name: 'gcr.io/cloud-builders/yarn'
  args: ['install']
  dir: 'functions/autodeploy'

  - name: 'gcr.io/cloud-builders/npm'
  args: ['test']
  dir: 'functions/autodeploy'

  - name: 'gcr.io/cloud-builders/gcloud'
  args: ['functions', 'deploy', 'someName', '--trigger-topic', 
         'some.topic.name', '--runtime', 'nodejs10']
  dir: 'functions/autodeploy'

Solution achieved discussing within comments, summarizing how the issue was fixed:解决方案在评论中实现了讨论,总结了问题是如何解决的:

  • Using the yarn parameter --ignore-engines in the app.yamlapp.yaml中使用yarn参数--ignore-engines
  • Specifying node version on the build yaml file steps, so it would look like this:在构建 yaml 文件步骤上指定节点版本,因此它看起来像这样:

     steps: - name: 'gcr.io/cloud-builders/yarn:node-10.10.0' args: ['install', '--ignore-engines'] dir: 'functions/autodeploy' - name: 'gcr.io/cloud-builders/npm:node-10.10.0' args: ['test'] dir: 'functions/autodeploy' - name: 'gcr.io/cloud-builders/gcloud' args: ['functions', 'deploy', 'someName', '--trigger-topic', 'some.topic.name', '--runtime', 'nodejs10'] dir: 'functions/autodeploy'

I had the same error and removing the file yarn.lock resolved the problem我有同样的错误,删除文件 yarn.lock 解决了问题

For me it solved by deleting the yarn.lock file对我来说,它通过删除 yarn.lock 文件解决了

暂无
暂无

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

相关问题 (在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" npx create-react-app -&gt; 引擎“节点”与此模块不兼容。 预期版本 "&gt;= 10.x"。 得到“8.16.0”-Arch Linux - npx create-react-app -> The engine "node" is incompatible with this module. Expected version ">= 10.x". Got "8.16.0" - Arch Linux 错误 find-up@4.1.0:引擎“节点”与此模块不兼容。 预期版本“&gt;=8”。 Ember js + Heroku 部署 - error find-up@4.1.0: The engine "node" is incompatible with this module. Expected version ">=8". Ember js + Heroku Deployment 引擎“节点”与此模块不兼容。 预期版本“12.x”。 得到“14.8.0” - The engine "node" is incompatible with this module. Expected version "12.x". Got "14.8.0" 引擎“节点”与该模块不兼容。 预期版本“XXX”。 得到了“XXX” - The engine "node" is incompatible with this module. Expected version "X.X.X". Got "X.X.X" 引擎“节点”与此模块不兼容。 预期版本“&gt; 0.4.x &lt; 0.9.0”。 有“12.22.1”吗? 如何解决这个问题 - The engine “node” is incompatible with this module. Expected version “> 0.4.x < 0.9.0”. Got “12.22.1” ? How to solve this create-react-app&gt;错误css-loader@1.0.0:引擎“节点”与此模块不兼容。 预期版本“&gt; = 6.9.0 &lt;7.0.0 || &gt; = 8.9.0” - create-react-app > error css-loader@1.0.0: The engine “node” is incompatible with this module. Expected version “>= 6.9.0 <7.0.0 || >= 8.9.0” Google App Engine - 引擎“节点”与此模块不兼容 - Google App Engine - The engine "node" is incompatible with this module firebase 云功能引擎节点与此模块不兼容 - firebase cloud funtions the engine node is incompatible with this module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM