Outils pour utilisateurs

Outils du site


informatique:mac:supprimer_node.js

Supprimer Node.js sur Mac OSX

Date de création : 2020/10/05 19:04

 

Cette page a pour source partielle ou intégrale la page suivante: nicolas-petitjean.com

Effacer les fichiers/dossiers suivants (en ligne de commande) :

  • node et/ou node_modules dans /usr/local/lib
  • node.d dans /usr/local/lib/dtrace/
  • node, node-debug, et node-gyp dans /usr/local/bin
  • node et/ou node_modules dans /usr/local/include
  • node* dans /usr/local/share/man/man1/
  • npm* dans /usr/local/share/man/man1/
  • node dans /usr/local/share/doc/
  • node.stp dans /usr/local/share/systemtap/tapset/
  • npmrc dans le répertoire utilisateur
  • npm dans le répertoire utilisateur
  • node-gyp dans le répertoire utilisateur
  • node_repl_history dans le répertoire utilisateur
  • node dans /opt/local/bin/
  • node dans /opt/local/include/
  • node_modules dans /opt/local/lib/

On peut aussi rechercher le binaire manuellement :

$ which node
/usr/local/bin/node

Troubleshooting on macOS

Since OS X 10.9, /usr/bin/git has been preset by Xcode command line tools, which means we can't properly detect if Git is installed or not. You need to manually install the Xcode command line tools before running the install script, otherwise, it'll fail. (see #1782)

If you get nvm: command not found after running the install script, one of the following might be the Since macOS 10.15, the default shell is zsh and nvm will look for .zshrc to update, none is installed by default.

Create one with touch ~/.zshrc et coller le export dedans and run the install script If you use bash, the previous default shell, run touch ~/.bash_profile to create the necessary profile file if it does not exist.

You might need to restart your terminal instance or run . ~/.nvm/nvm.sh. Restarting your terminal/opening a new tab/window, or running the source command will load the command and the new configuration.

If the above doesn't fix the problem, you may try the following:

If you use bash, it may be that your .bash_profile (or ~/.profile) does not source your ~/.bashrc properly. You could fix this by adding source ~/<your_profile_file> to it or follow the next step below.

  Try adding the snippet from the install section, that finds the correct nvm directory and loads nvm, to your usual profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
  For more information about this issue and possible workarounds, please refer here
informatique/mac/supprimer_node.js.txt · Dernière modification : 2022/04/10 17:26 de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki