Bower installation steps and bower dependency bootstrap download appears git is not installed or not in the PATH

 Bower installation steps

Step 1: Install nodejs
    1.  Bower can manage static resources and resolve dependencies
    2.  Bower is a nodejs-based tool (developed with nodejs), to use bower, you need to install nodejs
    3.  Nodejs is a software (normal installation) You can), but avoid installing in the Chinese directory,
        1.  After the installation is complete, there will be no icons on the desktop or icons displayed on the task, you can only use nodejs through the command line
        2.  Win+r input cmd will call Open the command line window
        3.  Enter node -v to verify whether nodejs is normal (the version number is displayed, it is normal)
        4.  Enter npm -v to verify whether npm is normal (the displayed version is normal)
        5.  The above two steps are all normal to indicate that the nodejs environment is built Finished
Step 2:
    1.  Install git
    2.  Double click to run
        1.  git bash
        2.  git gui
        3.  all the way next
        4. Find a file and right-click git bash hear
Step 3 Install bower
    1.  cmd 
    2.  npm install bower -g
        1.  The default is to install in the directory where you opened cmd
        2.  But we install it globally
            1.  npm install - g bower Enter
            2.  bower@version
            3.  You can use it
            4.  Verify bower -v 
                1.  You can install other
                    1.  bower install bootstrap Installed bootstrap static resources
                        1.  Computer -- Properties -- Environment Variables \bin ---Ignore
                2.  You can download bootstrap


problems


1.  git is not installed or not in the PATH when bower relies on bootstrap download
2.  Solution
    1.  In Computer-->Properties-->Advanced System Settings-->Environment Variables-->System Environment Variables--> Edit path
    2.  Add the bin and cmd paths of git
3.  Test whether it is resolved
    1.  Install bower install bootstrap in the dependencies you need
    2.  Pull bower_components successfully and there are bootstrap and jq under it

 

                                         ----------------------------------------------------------------- 12/25/2016 10:34:59 AM 

 

                                          -----------------------------------------------------------------by  zhuhw

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327059683&siteId=291194637