Search code examples
node.jsnvm

How to change node version using nvm


I am developing two projects. Each project requires different node version.(v12, v14) When I try to use one node version, it occurs node-sass error. Should I uninstall v12 and reinstall v14? I heard it can be repaired using nvm. Somebody tell me how to switch using nvm. Thanks.


Solution

  • nvm ls
    

    Show the list of versions you have installed:

    nvm ls
    v16.19.1
    v18.14.2
    

    After that, you can use this command to change the version

    nvm use default v16