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

前端 未结 28 2205
难免孤独
难免孤独 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:10

    On Mavericks I install it from the node pkg (from nodejs site) and I uninstall it so I can re-install using brew. I only run 4 commands in the terminal:

    1. sudo rm -rf /usr/local/lib/node_modules/npm/
    2. brew uninstall node
    3. brew doctor
    4. brew cleanup --prune-prefix

    If there is still a node installation, repeat step 2. After all is ok, I install using brew install node

提交回复
热议问题