今天想更换nodejs版本,使用node v14.15.4,下载的zip包,设置完环境变量,检查是否安装成功

>node -v

Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.

Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this

check, but Node.js might not execute correctly. Any issues encountered on

unsupported platforms will not be fixed.

问题原因:

  当前系统是Windows 7

  从node v14.x版本开始,需要Windows 8.1或更高版本

解决的方法:

  (1)使用 node v12

  (2)设置系统操作系统环境变量绕过校验

D:\>set NODE_SKIP_PLATFORM_CHECK=1

D:\>node -v

v14.15.4

  注:运行中可能会有风险

 

查看原文