git is not installed or not in the PATH

前端 未结 9 1186
天涯浪人
天涯浪人 2020-12-05 06:14

Windows, when I try to run npm install, it shows:

mean@1.0.0 postinstall E:\\mean
node node_modules/grunt-cli/bin/grunt install
Running \"bower:         


        
相关标签:
9条回答
  • 2020-12-05 07:11

    Install git and tortoise git for windows and make sure it is on your path, (the installer for Tortoise Git includes options for the command line tools and ensuring that it is on the path - select them).

    You will need to close and re-open any existing command line sessions for the changes to take effect.

    Then you should be able to run npm install successfully or move on to the next problem!

    0 讨论(0)
  • 2020-12-05 07:13

    while @vitocorleone is technically correct. If you have already installed, there is no need to reinstall. You just need to add it to your path. You will find yourself doing this for many of the tools for the mean stack so you should get used to doing it. You don't want to have to be in the folder that holds the executable to run it.

    • Control Panel --> System and Security --> System
    • click on Advanced System Settings on the left.
    • make sure you are on the advanced tab
    • click the Environment Variables button on the bottom
    • under system variables on the bottom find the Path variable
    • at the end of the line type (assuming this is where you installed it)

      ;C:\Program Files (x86)\git\cmd

    • click ok, ok, and ok to save

    This essentially tells the OS.. if you don't find this executable in the folder I am typing in, look in Path to fide where it is.

    0 讨论(0)
  • 2020-12-05 07:13

    In my case the issue was not resolved because i did not restart my system. Please make sure you do restart your system.

    0 讨论(0)
提交回复
热议问题