1. 程式人生 > 其它 >windows 安裝 nodejs指定版本

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.jsXand above

解決辦法:

  1、npm uninstall -g npm

  2、npm install -g npm