yarn install ember-cli 因节点引擎不兼容而失败

yarn install ember-cli fails with incompatible node engine

我的 CircleCI 构建今天开始失败,看起来 yarn 在安装 ember-cli 时遇到了问题。我在本地试过,但突然出现同样的错误。

我最近升级到 ember-cli 2.13.2,但我认为这无关紧要,因为升级后构建工作正常。

这是我的控制台输出:

~/code/my-app(master ✗) yarn global add ember-cli
yarn global v0.24.6
warning No license field
[1/4]   Resolving packages...
[2/4]   Fetching packages...
error core-object@3.1.2: The engine "node" is incompatible with this module. Expected version "=> ^4.0.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

您的 Node 版本是多少?我已经尝试通过 yarn Ember CLI 1.13 项目安装但它失败了,因为 CoreObject 需要 4 到 7 之间的版本。我已经将 Node 从 8 降级到 7 并且它有效。

我解决了我的问题。我使用的是使用最新版本节点的 Docker image。当节点更新到 8 时,我的 Circle 构建开始使用它。我最终创建了自己的图像,该图像与版本 6 挂钩并在 Circle 上使用它。