How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

前端 未结 28 2314
难免孤独
难免孤独 2020-11-21 05:28

My version of node is always v0.6.1-pre even after I install brew node and NVM install v0.6.19.

My node version is:



        
28条回答
  •  时光取名叫无心
    2020-11-21 06:04

    I'm not sure if it's because I had an old version (4.4.5), or if it's because I used the official installer, but most of the files referenced in other answers didn't exist on my system. I only had to remove the following:

    ~/.node-gyp
    ~/.node_repl_history
    /usr/local/bin/node
    /usr/local/bin/npm
    /usr/local/include/node
    /usr/local/lib/dtrace/node.d
    /usr/local/lib/node_modules
    /usr/local/share/doc/node
    /usr/local/share/man/man1/node.1
    /usr/local/share/systemtap/tapset/node.stp
    

    I decided to keep ~/.npm because I was planning on reinstalling Node with Homebrew.

提交回复
热议问题