社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

子模块不是git命令(在git for windows上有npm)

C. Nü • 5 年前 • 1319 次点击  

尝试使用npm进行安装时,出现错误:“submodule”不是git命令

Git Bash for Windows(版本:2.20.1.Windows.1)

$ npm install
Unhandled rejection Error: Command failed: C:\PROGRAM FILES\GIT\mingw64\bin\git.EXE submodule update -q --init --recursive
git: 'submodule' is not a git command. See 'git --help'.

at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:970:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npm ERR! cb() never called!

npm ERR! This is an error with npm itself.

我是git的初学者,我需要你的帮助来找到解决方案?谢谢!

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/41086
 
1319 次点击  
文章 [ 1 ]  |  最新文章 5 年前
VonC
Reply   •   1 楼
VonC    6 年前

使用a重试 simplified PATH 还有一个便携式git(比如 PortableGit-2.20.1-64-bit.7z.exe )在任何你想压缩的地方。

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
set PATH=c:\path\to\npm;%PATH%

然后检查该问题是否在CMD会话(您已经设置了所述简化路径)中持续存在 npm install 命令。