ZBLOG

Vue CLI v5.0.8 ✨ Creating project in D:\vuedaima\vue11. 🗃 Initializing git repository... ERROR Error: spawn git ENOENT Error: spawn git ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (inte...

This error occurs when the Vue CLI is unable to initialize a git repository for the new project because it cannot find the git executable.

To resolve this issue, make sure that Git is installed and its path is added to your system’s environment variables. You can check if Git is installed by opening a command prompt and typing “git –version”. If Git is not installed, you can download it from the official website (https://git-scm.com/downloads) and install it on your system.

If Git is already installed, try restarting your computer to ensure that any changes made to environment variables take effect. If the issue persists, you may need to add the path to Git manually. To do so:

  1. Open File Explorer and navigate to “This PC”.
  2. Right-click on “This PC” and select “Properties”.
  3. Click on “Advanced system settings” on the left-hand side.
  4. Click on the “Environment Variables” button at the bottom.
  5. Under “System variables”, scroll down and locate the “Path” variable.
  6. Click on “Edit”.
  7. Click on “New” and add the path to your Git installation (e.g., C:\Program Files\Git\bin).
  8. Click “OK” on all windows to save changes.

Once you have added Git’s path to your system’s environment variables, try creating a new Vue project again using Vue CLI.

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=4558

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?