将Angular 6升级到Angular 8(ivy)时出错

时间:2019-06-10 17:52:37

标签: angular typescript angular-material2 angular8

嗨,我在升级到角度8(ivy)时遇到以下错误

ERROR in Value at position 2 in the NgModule.importss of MatSidenavModule is not a reference: [object Object]

我的tsconfig.json看起来像这样

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esnext", // add this line
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

tsconfig.app.json看起来像这样

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": []
  },
  "angularCompilerOptions": {
    "enableIvy": true
  },
  "exclude": ["test.ts", "**/*.spec.ts"]
}

0 个答案:

没有答案