Home > Mobile >  Node version needs upgrading?? but its higher than what its recommending?
Node version needs upgrading?? but its higher than what its recommending?

Time:12-01

Im trying to run

npm run serve

on a certain project.

and I get

[email protected] 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.

Which is confusing. Its asking me to upgrade but I clearly have a higher version that ^12.0??

Or does it want me to downgrade??

Whats happening here?

CodePudding user response:

The current version of @vue/cli-service requires

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

but the error message doesn't show that for some reason.

Upgrade to Node >= 14; 13.x is not a LTS release, which is likely why it's not explicitly supported.

Node 16.x is the current LTS release.

CodePudding user response:

The carat at the start of a version in package.json indicates that you must have a major version that is equal to the version specified.

According to 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.

That is to say, your Node version of 13.14.0 is outside of the range 12.x.x (which is required by your version of vue-cli-service).

You will either need to downgrade Node, or upgrade vue-cli-service.

  • Related