NPM陷入克隆的github项目Angular

时间:2019-06-06 14:58:27

标签: angular npm angular-cli

我正在尝试克隆一个github项目。我认为NPM或package.json有问题。

我跑步时

ng --verison

在我得到的克隆项目中

PS ..\..\ClonedProject> ng --version

Angular CLI: 8.0.1
Node: 10.15.3
OS: win32 x64
Angular: <error>
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, http, language-service, material, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.800.1 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            8.0.1 (cli-only)
@angular-devkit/schematics      8.0.1 (cli-only)
@schematics/angular             8.0.1 (cli-only)
@schematics/update              0.800.1 (cli-only)
rxjs                            6.4.0 (cli-only)
typescript                      <error>

如果我运行

ng --version

在本地计算机上创建的另一个项目(未克隆)中,我得到:

Angular CLI: 8.0.1
Node: 10.15.3
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

所以我当时认为这与NPM有关。当我尝试在ClonedProject中重新安装npm时,npm挂在rxjs上:

[            ......] \ extract:rxjs: sill extract rxjs@6.5.2 extracted to C:\..\..\ClonedProject\node_modules\.staging\rxjs-b78e1abc (21998ms)

我尝试卸载npm并重新安装npm,但仍然遇到相同的问题。我真的不想创建一个全新的项目并复制和粘贴所有内容。还有其他人遇到这个问题吗?如果需要,我可以发布更多。

Package.json

{
  "name": "angular-tour-of-hobbies",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.6",
    "@angular/animations": "^8.0.0",
    "@angular/cdk": "^7.0.4",
    "@angular/common": "^8.0.0",
    "@angular/compiler": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/forms": "^8.0.0",
    "@angular/http": "^6.0.3",
    "@angular/material": "^6.4.7",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "@types/express": "^4.16.0",
    "@types/socket.io": "^1.4.36",
    "@types/socket.io-client": "^1.4.32",
    "angular-in-memory-web-api": "^0.6.0",
    "bootstrap": "^4.3.1",
    "bootstrap-toggle": "^2.2.2",
    "core-js": "^2.5.4",
    "express": "^4.16.3",
    "jquery": "^3.4.1",
    "ngx-cookie-service": "^2.1.0",
    "node-vibrant": "^3.1.3",
    "popper": "^1.0.1",
    "popper.js": "^1.14.4",
    "rxjs": "^6.5.2",
    "rxjs-compat": "^6.5.2",
    "socket.io": "^2.1.1",
    "socket.io-client": "^2.1.1",
    "zone.js": "^0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.800.1",
    "@angular/cli": "~8.0.1",
    "@angular/compiler-cli": "^8.0.0",
    "@angular/language-service": "^8.0.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "gulp": "^4.0.2",
    "gulp-typescript": "^5.0.0-alpha.3",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^6.0.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "^3.4.5"
  }
}

0 个答案:

没有答案