当我从根目录执行find . -name "node*"
时,得到:
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node_exporter.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/nodeenv.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node-sass.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node@14.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node@10.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/nodebrew.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node@12.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/nodenv.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node@16.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node-build.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node@18.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/nodejs
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/node@19
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/node.js
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nodeclipse.rb
./usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nodebox.rb
./usr/local/Homebrew/Library/Homebrew/rubocops/cask/extend/node.rb
./usr/local/Homebrew/Library/Homebrew/test/language/node_spec.rb
./usr/local/Homebrew/Library/Homebrew/language/node.rb
但是brew ls
没有显示节点,node -v
和npm
显示这些命令没有安装在PATH中,这是怎么回事?
我经历了
我经历了从我自己的安装中删除所有节点和npm的痕迹的过程,因为npm被损坏了(错误处理漏洞),现在想用brew安装它,或者用其他方法,这样当尝试npm install
时,npm的所有错误就不会发生。为什么brew安装了节点,即使我没有安装它?
1条答案
按热度按时间pvabu6sv1#
这些文件不是NodeJS本身,而是告诉Homebrew如何安装NodeJS的说明。您可以使用
brew cleanup
删除这些公式(沿着任何其他未使用的公式)。编辑:您实际上不能删除公式,因为如果您要在以后安装它,则需要这些公式。