节点v12.6出现一些错误,因此我试图降级为node @ 11。
执行brew install node@11
会给我标题错误,而且我在Google上找不到很多继续操作的结果。
完整错误:-
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
wtfutil
==> Updated Formulae
glooctl juju k6 moarvm moe nqp pulumi rakudo terraform topgrade xrootd
Error: No available formula with the name "node@11"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
brew search node
为我提供了以下内容,因此看来我已经安装了11个。
leafnode libbitcoin-node llnode node ✔ node-build node@10 node@8 node_exporter nodebrew nodeenv nodenv
答案 0 :(得分:1)
我不确定是什么导致了我的错误,但是一种解决方法是按照以下指南使用NVM安装v.11:-
https://www.npmjs.com/package/nvm
要安装NVM,然后安装节点版本11,只需执行以下操作:
$ brew install nvm
$ nvm install 11
答案 1 :(得分:-1)
**TERMINAL**
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm