升级Node.js时
node -v
npm cache clean -f
运行 npm install -g n 报错误
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
去官网https://nodejs.org/en/download/下载 LTS版本的 nod
安装到"C:\Program Files (x86)\nodejs"目录即可
"C:\Program Files (x86)" 用于安装32位软件安装目录
"C:\Program Files"用于安装64位软件安装目录