Trying to create a new Vue Project, but node requires upgrade? Running vue2 and node 10

Viewed 27

I can't create a vue project. I keep getting this error:

You are using Node v10.19.0, but this version of @vue/cli requires Node ^12.0.0 || >= 14.0.0.
Please upgrade your Node version

I don't want to update node either, it will break another project I have going on. It's weird that I have a different project that successfully npm run serve, but cannot create another one? Thanks in advance.

1 Answers

After I installed nvm, I had to also do this step: nvm install node to install the latest version. Then you can check the following: node -v

If you do nvm ls remote it will display all available versions, then you can install any of them and view which ones you picked using nvm ls.

I set my node version default like this: nvm alias default <version>

I just ran into this issue as well using nvm. I did have to delete the package-lock.json file in the project directory and rebuild. But after doing so it seems to not have any trouble going between the node versions.:

https://blog.logrocket.com/how-switch-node-js-versions-nvm/

Related