簡體   English   中英

如何使用 Homebrew 降級或安裝較舊或特定版本的節點?

[英]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 網站下載:

https://nodejs.org/download/release/v9.10.0/

首先做: brew search node並告訴我你得到了什么如果你得到你想要的節點版本:
brew install node@availableversion

試試下面:

  1. eval "$(nodenv init -)"
  2. node -v
  3. brew unlink (the node version you see)
  4. nodenv install -l
  5. nodenv install (the node version you want on the list)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM