Troubleshooting "Command not Found" error when installing Grunt on Mac

Source: Internet
Author: User

The first step:

1 determine first. Whether the bash_profile exists.

2 in Mac terminal input:

Test-e. Bash_profile && echo "Found" | | echo "Not Found"

3.bash_profile is an environment-configured script that runs at the terminal if not found is displayed

Touch ~/.bash_profile

Repeat 2 after running, display found, indicates the creation is successful

Step Two:

1 Installing GRUNT-CLI

sudo npm install-g grunt-cli

    

2 Open the. bash_profile file in the first step in the form of a command, with the following command:

Open-a TextEdit ~/.bash_profile

3 Write the environment configuration to the. Bash_profile you opened, then save the ctrl+s, then exit, note that the path is different for each person, to see their own GRUNT-CLI installation road path is not valid for error

    Export Path=/usr/local/cellar/node/6.7.0/libexec/npm/lib/node_modules/grunt-cli/bin: $PATH

    

Step Three:

1 running at Terminal: Source ~/.bash_profile

2 running at Terminal: Grunt--version

If it works, you'll see the version number of the GRUNT-CLI.

  

  

END

Troubleshooting "Command not Found" error when installing Grunt on Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.