Apparently, there was a /Users/myusername/local
folder that contained a include
with node
and lib
with node
and node_modules
.
(显然,存在一个/Users/myusername/local
文件夹,其中包含一个include
node
和lib
以及node
和node_modules
。)
How and why this was created instead of in my /usr/local
folder, I do not know.(我不知道是如何以及为什么创建它的,而不是在我的/usr/local
文件夹中创建的。)
Deleting these local references fixed the phantom v0.6.1-pre.
(删除这些本地引用可修复幻影v0.6.1-pre。)
If anyone has an explanation, I'll choose that as the correct answer.(如果有人有解释,我会选择它作为正确答案。)
EDIT:
(编辑:)
You may need to do the additional instructions as well:
(您可能还需要执行其他说明:)
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
which is the equivalent of (same as above)...
(等价于(与上述相同)...)
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp
or (same as above) broken down...
(或(与上述相同)损坏...)
To completely uninstall node + npm is to do the following:
(要完全卸载node + npm,请执行以下操作:)
- go to /usr/local/lib and delete any node and node_modules
(转到/ usr / local / lib并删除任何节点和node_modules)
- go to /usr/local/include and delete any node and node_modules directory
(转到/ usr / local / include并删除任何node和node_modules目录)
- if you installed with brew install node , then run brew uninstall node in your terminal
(如果你安装了冲泡安装节点 ,然后在你的终端上运行的BREW卸载节点)
- check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
(检查主目录中是否有任何本地或lib或包含文件夹,并从此处删除任何节点或node_modules)
- go to /usr/local/bin and delete any node executable
(转到/ usr / local / bin并删除任何节点可执行文件)
You may also need to do:
(您可能还需要执行以下操作:)
sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d
Additionally, NVM modifies the PATH variable in $HOME/.bashrc
, which must be reverted manually .
(另外,NVM修改$HOME/.bashrc
的PATH变量,该变量必须手动还原 。)
Then download nvm and follow the instructions to install node.
(然后下载nvm并按照说明安装节点。)
The latest versions of node come with npm , I believe, but you can also reinstall that as well.(我相信node的最新版本是npm附带的,但是您也可以重新安装它。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…