Я клонировал git-репозиторий, это приложение Angular 7 ASP.NET, все нормально в проекте, но когда я пытаюсь восстановить пакеты npm, я получаю сообщение об ошибке ниже.
Обновление подмодуля \ Microsoft \ TeamFoundation \ Team Explorer \ Git \ cmd \ git.EXE - q --init --recursive fatal: «submodule» выглядит как команда git, но мы не былив состоянии выполнить это.Может быть, git-submodule не работает?в ChildProcess.exithandler (child_process.js: 291: 12) в ChildProcess.emit (events.js: 182: 13) в MaybeClose (внутренняя / child_process.js: 961: 16) в Process.ChildProcess._handle.onexit (внутренняя /child_process.js: 248: 5) npm ERR!cb () никогда не вызывается!
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-version
равен 10.7.0
, а npm-version
равен 6.4.1
Я обнаружил на GitHub некоторые проблемы, подобные этой, и они добавили исправление в npm-lifecycle, поэтому я установил npm-lifecycle
, но я все еще получаю ту же ошибку