[英]How to install older version of node.js on Windows?
我需要安裝 node.js 版本 4.0.0 我試過這個:
npm install -g npm@4.0.0
但我收到此消息:npm 未被識別為內部或外部命令、可運行程序或批處理文件
到這里找到您要安裝的版本,然后下載正確的 msi 文件並運行安裝程序。 您無法通過運行此命令來安裝節點,而且您收到的錯誤是指出 npm 不在您的路徑上,這表明機器當前沒有安裝節點
對於 Windows,最好是: nvm-windows
1)安裝.exe
2)重啟(否則nvm不會undefined)
3)以管理員身份運行CMD,
4)nvm 使用 5.6.0
注意:您必須以管理員身份運行才能每次切換節點版本。
只需卸載您系統中的任何節點版本。 然后轉到此站點https://nodejs.org/download/release/並選擇您想要的版本,例如 v7.0.0/,然后單擊該站點以獲取該版本的.msi文件。 最后你會在你的系統中得到安裝程序,所以安裝它。 它會解決你所有的問題。
跑:
npm install -g node@7.10.1
- or whatever version you want after the @ symbol (This works as of 2019)
首先,您需要從系統中卸載 nodejs,最好從添加或刪除程序或控制面板中卸載。 然后,go 到nodejs官方網站,向下滾動以找到previous releases
,如圖所示
單擊previous releases
並在搜索框中輸入您要搜索的版本
Go downloads
,最后 select 列表中的msi
文件
用法:
nodist List all installed node versions.
nodist list
nodist ls
nodist <version> Use the specified node version globally (downloads the executable, if necessary).
nodist latest Use the latest available node version globally (downloads the executable, if necessary).
nodist add <version> Download the specified node version.
更多 Nodist 命令在這里
我需要安裝4.0.0版的node.js,我嘗試了以下操作:
npm install -g npm@4.0.0
但是我得到了以下消息:npm無法識別為內部或外部命令,可操作程序或批處理文件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.