升級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
去官網(wǎng)https://nodejs.org/en/download/下載 LTS版本的 nod
安裝到"C:\Program Files (x86)\nodejs"目錄即可
"C:\Program Files (x86)" 用于安裝32位軟件安裝目錄
"C:\Program Files"用于安裝64位軟件安裝目錄