❤ npm install 时报Error: spawn git ENOENT

❤ npm install 时报Error: spawn git ENOENT

原因:

主要是因为由于 git 的环境变量未设置导致,所以安装一下git 的环境变量就O了,步骤如下:

设置 >> 系统 >> 高级系统设置 >> 高级 >> 环境变量 >> 系统变量:添加一下git 的安装地址

在环境变量的path里添加上 C:\Program Files\Git\cmd 就可以了。路径根据你的git 的安装目录调整

1.重新安装Git

2.环境变量配置path

3.git init

相关推荐
木风小助理1 小时前
Elasticsearch生产环境最佳实践指南
大数据·elasticsearch·搜索引擎
wxr06161 小时前
GIT学习
git·学习
猫头虎3 小时前
2026最新|GitHub 启用双因素身份验证 2FA 教程:TOTP.app 一键生成动态验证码(新手小白图文实操)
git·开源·gitlab·github·开源软件·开源协议·gitcode
爱学英语的程序员4 小时前
让AI 帮我做了个个人博客(附提示词!)
人工智能·git·vue·github·node·个人博客
Elasticsearch4 小时前
Elasticsearch:Jina Reader
elasticsearch
五仁火烧5 小时前
npm run build命令详解
前端·vue.js·npm·node.js
liu****5 小时前
git工具
git·python·算法·机器学习·计算机基础
Elasticsearch5 小时前
Elastic 获得 ISO 27701 认证
elasticsearch
Elasticsearch5 小时前
Elastic:DevRel 通讯 — 2026 年 1 月
elasticsearch
wxr06166 小时前
git无法克隆
git