windows 安裝 nodejs指定版本


window server 2008 安裝 node-v16.11.0-x64時報  This application only supported on window8.1, windows Server 2012R2,or higher。 

 

經查 window server 2008能 node-v13及以下版本。

 

 

於是在網站:https://nodejs.org/en/download/releases/ 下載node-v13.8.0-x64。

 

 

安裝前先卸載之前安裝的nodejs,卸載時報沒有權限,不用管它。

再安裝node時,也可能會提示不能更新path,沒有權限,不管它。我查到有網友說要修改注冊表,但是修改后也是沒用。因為本身用戶就是超級管理員。

安裝完成后,在項目中執行npm install 可能會報:

You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> X or < X) or node-tar (> X) that is compa
tible with Node.js X and above

解決辦法: 

  1、npm uninstall -g npm

  2、npm install -g npm

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM