节点版本需要升级??但它高于它的推荐值?

Node version needs upgrading?? but its higher than what its recommending?

我正在尝试 运行

npm run serve

在某个项目上。

然后我得到

vue-notus@1.1.0 serve F:\WEB_DEV\Github\vue-notus-main vue-cli-service serve

ERROR  You are using Node v13.14.0, but vue-cli-service requires 
Node ^12.0.0
Please upgrade your Node version.

这令人困惑。它要求我升级,但我显然有一个更高的版本 ^12.0??

还是要我降级??

这里发生了什么?

@vue/cli-servicecurrent version需要

"node": "^12.0.0 || >= 14.0.0"

但由于某种原因错误消息并未显示。

升级到节点 >= 14; 13.x 不是 LTS 版本,这可能是它未被明确支持的原因。

节点 16.x 是当前的 LTS 版本。

package.json 版本开头的克拉表示您必须有一个 主要 版本,即 等于 到指定的版本。

根据the semver documentation

Allows changes that do not modify the left-most non-zero element in the [major, minor, patch] tuple. In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X.

也就是说,你的Node版本13.14.0超出了12.x.x的范围(这是你的vue-cli-service版本所要求的)。

您需要降级节点,或升级 vue-cli-service.