未捕获的错误:找不到模块“ tslib”

时间:2018-08-28 19:02:40

标签: angular jasmine karma-jasmine

我正在测试我的角度应用程序,并且在不做任何更改的情况下进行了一些成功测试之后,出现以下错误:

  

HeadlessChrome 68.0.3440(Mac OS X 10.12.6)错误未捕获的错误:   找不到模块“ tslib”。在   http://localhost:9877/_karma_webpack_/main.js:150

有人有同样的问题吗?

package.json
{
  "name": "test",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "cross-env ng serve",
    "start:proxy": "cross-env ng serve --proxy-config proxy.conf.json",
    "mock:server": "json-server --watch data.json",
    "start:ps": "cross-env concurrently --kill-others \"npm run mock:server\" \"npm run start:proxy\"",
    "build": "ng build",
    "test": "ng test --watch=false",
    "test:local:coverage": "ng test --watch=false --codeCoverage",
    "test:local:watch": "ng test --watch=true",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "show:coverage": "http-server -c-1 -o -p 9875 ./coverage",
    "pre-push": "npm run lint && npm run build && npm run test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.4",
    "@angular/cdk": "^6.4.6",
    "@angular/common": "^6.0.3",
    "@angular/compiler": "^6.0.3",
    "@angular/core": "^6.0.3",
    "@angular/forms": "^6.0.3",
    "@angular/http": "^6.0.3",
    "@angular/material": "^6.4.6",
    "@angular/platform-browser": "^6.0.3",
    "@angular/platform-browser-dynamic": "^6.0.3",
    "@angular/router": "^6.0.3",
    "bootstrap": "^4.1.3",
    "core-js": "^2.5.4",
    "font-awesome": "^4.7.0",
    "hammerjs": "^2.0.8",
    "http-server": "^0.11.1",
    "intl": "^1.2.5",
    "normalize.css": "^8.0.0",
    "rxjs": "^6.2.2",
    "rxjs-compat": "^6.2.2",
    "tslib": "^1.9.3",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^6.0.3",
    "@angular-devkit/build-angular": "~0.6.8",
    "typescript": "~2.7.2",
    "@angular/cli": "~6.0.8",
    "@angular/language-service": "^6.0.3",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "concurrently": "^4.0.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "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": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1"
  }
}

1 个答案:

答案 0 :(得分:6)

您的来源中的某处有

select * from sys.dm_tcp_listener_states

您应该在哪里:

import { ... } @angular/compiler/src/core