I have screwed up the installation of node on my computer over the course of a few months by deleting using rm and reinstalling with brew. I recently managed to fix the 'node' command such that 'node -v' works fine. However, the command 'npm' is not found. Additionally, every time I open a terminal I get the following text:
Last login: Sun Dec 19 22:33:22 on ttys002
N/A: version "N/A -> N/A" is not yet installed.
You need to run "nvm install N/A" to install it before using it.
The default interactive shell is now zsh.
This leads me to believe that I have some issue with my bashrc file.
Does anyone have any idea what steps I can take to resolve this issue, or if it would be a better option to simply factory restore my computer?
CodePudding user response:
Use nvm to install any version of node and npm (e.g: v16.13.1).
type nvm alias default v16.13.1 in your terminal and then type nvm use default