How to downgrade Node version

前端 未结 12 757
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 10:53

I want to downgrade my Node version from the latest to v6.10.3.

But nothing worked so far. Tried NVM and it gives an error as well by saying make comman

12条回答
  •  隐瞒了意图╮
    2020-12-12 11:43

    This may be due to version incompatibility between your code and the version you have installed.

    In my case I was using v8.12.0 for development (locally) and installed latest version v13.7.0 on the server.

    So using nvm I switched the node version to v8.12.0 with the below command:

    > nvm install 8.12.0 // to install the version I wanted
    
    > nvm use 8.12.0  // use the installed version
    

    NOTE: You need to install nvm on your system to use nvm.

    You should try this solution before trying solutions like installing build-essentials or uninstalling the current node version because you could switch between versions easily than reverting all the installations/uninstallations that you've done.

提交回复
热议问题