似乎是一个git命令

似乎是一个git命令

本文介绍了'submodule'似乎是一个git命令,但我们无法执行它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经克隆了一个git存储库,它是Angular 7 ASP.NET应用程序,项目中的一切都很好,但是当我尝试还原npm软件包时,出现以下错误.

I have cloned a git repository it's an Angular 7 ASP.NET app, everything is fine in the project but when I try to restore npm packages I get the error below.

Package.json

{
 "name": "name",
 "version": "6.1.1",
 "license": "......",
 "scripts": {
   "ng": "ng",
   "start": "ng serve --open",
   "start-hmr": "ng serve --configuration hmr -sm=false",
   "start-hmr-sourcemaps": "ng serve --hmr -e=hmr",
   "build": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev",
   "build-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev --stats-json",
   "build-prod": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod",
   "build-prod-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod --stats-json",
   "test": "ng test",
   "lint": "ng lint",
   "e2e": "ng e2e",
   "bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
  "@agm/core": "1.0.0-beta.3",
  "@angular/animations": "6.0.5",
  "@angular/cdk": "6.2.1",
  "@angular/common": "6.0.5",
  "@angular/compiler": "6.0.5",
  "@angular/core": "6.0.5"
},
"devDependencies": {
  "@angular-devkit/build-angular": "0.6.8",
  "@angular/cli": "6.0.8",
  "@angular/compiler-cli": "6.0.5",
  "@angular/language-service": "6.0.5",
  "@angularclass/hmr": "2.1.3",
  "typescript": "2.7.2",
  "webpack-bundle-analyzer": "2.13.1"
  }
}

我安装的node-version10.7.0npm-version6.4.1

我在GitHub上发现了类似的问题,他们在npm-lifecycle中添加了一个修复程序,因此我安装了npm-lifecycle,但仍然遇到相同的错误

I found on GitHub some issues like this and they added a fix in npm-lifecycle, so I installed the npm-lifecycle but I'm still getting the same error

推荐答案

submodule命令未内置在基本git.exe二进制文件中,它以名为git-submodule的shell脚本实现,需要可访问从%PATH%开始,并且对于执行该操作的用户而言是可执行的.

The submodule command is not built into the base git.exe binary, it is implemented as a shell script named git-submodule, which needs to be accessible from the %PATH%, and to be executable for the user who runs the action.

  • 您的%PATH%是什么(或您的npm进程的%PATH%)是什么?
  • 它是否包含您的git安装路径,该路径似乎在\Microsoft\TeamFoundation\Team Explorer\Git\中?
  • 运行npm进程的用户是否对git-submodule具有执行权限?
  • What is your %PATH% (or the %PATH% for your npm process) ?
  • Does it include the path to your git installation, which seems to be somewhere in \Microsoft\TeamFoundation\Team Explorer\Git\ ?
  • Does the user which runs the npm process have execution rights on git-submodule ?

这篇关于'submodule'似乎是一个git命令,但我们无法执行它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 16:05