[英]How to downgrade or install older or specific version of node using Homebrew?
老實說,我是釀酒新手。 我想使用較早版本的 Node.js。 我的當前版本是node@14
。
我一直嘗試安裝的版本是node@9.10.0
,我嘗試使用Brew安裝它。 brew install node@9.10.0
在線, 我已按照此處的說明進行操作
但它不斷向我拋出錯誤,我不確定我是否在這里做錯了什么。
Warning: No available formula or cask with the name "node@9". Did you mean node, nodenv, node@12, node@10, node@14 or ode?
==> Searching for similarly named formulae...
These similarly-named formulae were found:
node ✔ nodenv node@12 node@10 node@14 ode
To install one of them, run (for example):
brew install node ✔
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
我嘗試更新 brew,我也嘗試過brew doctor
來解決任何類型的並發症。
我也嘗試過完全卸載Node
並使用Brew
安裝它,但任何方法似乎都不起作用。 我應該使用不同的子命令嗎? 有沒有我應該嘗試的完全不同的方法?
我正在運行 macOS Bigsur 11.6 和 Homebrew 3.2.16
您可以從 nodejs 網站下載:
首先做: brew search node
並告訴我你得到了什么如果你得到你想要的節點版本:
brew install node@availableversion
試試下面:
eval "$(nodenv init -)"
node -v
brew unlink (the node version you see)
nodenv install -l
nodenv install (the node version you want on the list)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.