我一直在尝试在Mac上安装node.js以使用React Native。我尝试了很多次安装和重新安装节点的操作,但是会遇到很多错误。
我尝试在新的硬盘驱动器上安装,但似乎仍然无法正常工作。
我会尝试的方法:
bash-3.2$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-12.8.0.mojave.bottle.t
Already downloaded: /Users/malqadi/Library/Caches/Homebrew/downloads/8ea6192c6101b64b58b3ff8bf0cab0b89eb67851ec11f5c95edda2fffcbdbfb0--node-12.8.0.mojave.bottle.tar.gz
==> Pouring node-12.8.0.mojave.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/systemtap/tapset/node.stp
Target /usr/local/share/systemtap/tapset/node.stp
already exists. You may want to remove it:
rm '/usr/local/share/systemtap/tapset/node.stp'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
Possible conflicting files are:
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
? /usr/local/Cellar/node/12.8.0: 4,629 files, 53.1MB
我按照推荐的方式进行操作,但操作相同:
bash-3.2$ brew postinstall node
==> Postinstalling node
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
所以我尝试酿造医生:
bash-3.2$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node
我将如何使用它?
答案 0 :(得分:0)
尝试使用以下命令删除npm模块:
rm '/usr/local/share/systemtap/tapset/node.stp'
在使用此命令链接节点之前:
brew link node