Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 财产';开始跟踪';不存在于类型';角度分析法&x27;_Angular_Typescript_Angulartics2 - Fatal编程技术网

Angular 财产';开始跟踪';不存在于类型';角度分析法&x27;

Angular 财产';开始跟踪';不存在于类型';角度分析法&x27;,angular,typescript,angulartics2,Angular,Typescript,Angulartics2,我一直遵循的自述。但我得到了一个错误: src/app/app.component.ts(21,33)中出现错误:错误TS2339:类型“Angulartics2GoogleAnalytics”上不存在属性“startTracking”。 我假设我的依赖项版本有一些问题,一个类似的线程()建议依赖项应该是“rxjs”:“6.0.0”,typesript应该高于2.6。但是我还是有问题 有什么想法吗 mypackage.json { “名称”:“流量应用程序”, “版本”:“1.1.0”, “许

我一直遵循的自述。但我得到了一个错误:

src/app/app.component.ts(21,33)中出现错误:错误TS2339:类型“Angulartics2GoogleAnalytics”上不存在属性“startTracking”。

我假设我的依赖项版本有一些问题,一个类似的线程()建议依赖项应该是“rxjs”:“6.0.0”,typesript应该高于2.6。但是我还是有问题

有什么想法吗

mypackage.json

{
“名称”:“流量应用程序”,
“版本”:“1.1.0”,
“许可证”:“麻省理工学院”,
“脚本”:{
“ng”:“ng”,
“开始”:“ng发球”,
“构建”:“ng构建”,
“测试”:“ng测试”,
“皮棉”:“ng皮棉”,
“e2e”:“ng e2e”,
“build:prepod”:“ng build--prod--source map--configuration=prepod--base href/dist/”,
“build:prod”:“ng build--prod--build optimizer--configuration=production--base href/dist/”
},
“私人”:没错,
“依赖项”:{
“@angular/animations”:“^5.1.0”,
“@angular/cdk”:“^5.0.0”,
“@angular/common”:“^5.1.0”,
“@angular/compiler”:“^5.1.0”,
“@angular/core”:“^5.1.0”,
“@angular/forms”:“^5.1.0”,
“@angular/http”:“^5.0.0”,
“@angular/material”:“^5.2.5”,
“@angular/platform浏览器”:“^5.0.0”,
“@angular/platform browser dynamic”:“^5.0.0”,
“@angular/router”:“^5.0.0”,
“@ng bootstrap/ng bootstrap”:“^1.0.0-beta.7”,
“角度2”:“^6.3.1”,
“classlist.js”:“^1.1.20150312”,
“核心js”:“^2.4.1”,
“ng2 opd弹出窗口”:“^1.1.21”,
“rxjs”:“6.0.0”,
“rxjs compat”:“6.0.0”,
“web动画js”:“^2.3.1”,
“zone.js”:“^0.8.14”,
“ajv”:“^6.9.1”
},
“依赖性”:{
“@angular devkit/build angular”:“^0.13.3”,
“@angular/cli”:“^6.2.3”,
“@angular/compiler cli”:“^5.0.0”,
“@angular/language service”:“^5.0.0”,
“@types/jasmine”:“~2.5.53”,
“@types/jasminewd2”:“~2.0.2”,
“@types/node”:“~6.0.60”,
“codelyzer”:“~3.2.0”,
“茉莉花芯”:“~2.6.2”,
“jasmine spec reporter”:“~4.1.0”,
“因果报应”:“~1.7.0”,
“卡玛铬发射器”:“~2.1.1”,
“karma cli”:“~1.0.1”,
“因果报应报道伊斯坦布尔记者”:“^1.2.1”,
“因果报应茉莉”:“~1.1.0”,
“karma jasmine html reporter”:“^0.2.2”,
“量角器”:“^5.4.2”,
“ts节点”:“~3.2.0”,
“tslint”:“~5.7.0”,
“类型脚本”:“^2.6.2”
}
}

当使用rxjs 6.x.x时,我需要将Angular更新到版本6.x.x。这意味着我还必须使用最新版本的angulartics2。 这是我的package.json

{
  "name": "flow-app",
  "version": "1.1.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build:preprod": "ng build --prod --source-map --configuration=preprod --base-href /dist/",
    "build:prod": "ng build --prod --build-optimizer --configuration=production --base-href /dist/"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/cdk": "^6.0.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.0.0",
    "@angular/material": "^6.2.5",
    "@angular/platform-browser": "^6.0.0",
    "@angular/platform-browser-dynamic": "^6.0.0",
    "@angular/router": "^6.0.0",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.7",
    "ajv": "^6.10.0",
    "angulartics2": "^7.0.1",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.4.1",
    "ng2-opd-popup": "^1.1.21",
    "rxjs": "^6.4.0",
    "rxjs-compat": "^6.4.0",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.4",
    "@angular/cli": "^6.2.3",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "^2.9.2"
  }
}

事实证明,在使用rxjs 6.x.x时,我需要将Angular更新到版本6.x.x。这意味着我还必须使用最新版本的angulartics2。 这是我的package.json

{
  "name": "flow-app",
  "version": "1.1.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build:preprod": "ng build --prod --source-map --configuration=preprod --base-href /dist/",
    "build:prod": "ng build --prod --build-optimizer --configuration=production --base-href /dist/"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/cdk": "^6.0.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.0.0",
    "@angular/material": "^6.2.5",
    "@angular/platform-browser": "^6.0.0",
    "@angular/platform-browser-dynamic": "^6.0.0",
    "@angular/router": "^6.0.0",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.7",
    "ajv": "^6.10.0",
    "angulartics2": "^7.0.1",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.4.1",
    "ng2-opd-popup": "^1.1.21",
    "rxjs": "^6.4.0",
    "rxjs-compat": "^6.4.0",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.4",
    "@angular/cli": "^6.2.3",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "^2.9.2"
  }
}