安裝全局n模塊:
C:\Users\Administrator>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.7: 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
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache_logs\2017-05-02T02_08_33_861Z-d
ebug.log
報錯哦怀估,那執(zhí)行下面的命令:
C:\Users\Administrator>npm install -g n --force
npm WARN using --force I sure hope you know what you are doing.
C:\Program Files\nodejs\node_global\n -> C:\Program Files\nodejs\node_global\nod
e_modules\n\bin\n
C:\Program Files\nodejs\node_global
`-- n@2.1.7
4、升級NodeJs到最新版本:
升級到最新穩(wěn)定版本:
n stable
升級到最新版本:
n latest
升級到指定版本:
n 0.10.26
作者:doitplayer
來源:CSDN
原文:https://blog.csdn.net/DoitPlayer/article/details/71077333
版權聲明:本文為博主原創(chuàng)文章灿椅,轉載請附上博文鏈接溅固!