Download the. PKG file of the node from the official website to install the node. After installation, enter NPM – V and node – V in the MAC terminal to prompt command not found. Refer to the method on the Internet, and finally get the solution
Step 1: create. Bash_ Profile file, ~ means in the ~ directory,. Means hidden file. Open the terminal and enter the following command
touch ~/.bash_profile
Step 2: open. Bash_ The input command is as follows:
open -t ~/.bash_profile
Step 3: a blank text edit box will pop up. Edit the first line in the text edit box
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Command + s saves the file
Step 4: save. Bash_ Profile file, enter the command:
source .bash_profile
Step 5: enter NPM – V or node – V again to see the version number~
Similar Posts:
- Solve the problem of ADB: command not found on MAC
- Mac ADB prompts command not found
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- Mac open terminal error – bash:: command not found
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- [Solved] JMeter startup error: integer expression expected
- -bash: ls: command not found [How to Solve]
- [Mac Error]-bash: mysql: command not found
- Ifconfig command not found for Linux Installation Errors [How to Solve]
- How to install “CONDA command not found” in MAC Anaconda