【问题标题】:Angular build error "..has no exported member 'ɵReflectorReader'."角度构建错误“..没有导出的成员'ɵReflectorReader'。”
【发布时间】:2017-12-24 02:52:48
【问题描述】:

有人知道是什么导致了这个构建错误吗?

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/compile_metadata.d.ts (8,109): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵLifecycleHooks'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/template_parser/template_ast.d.ts (8,27): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵLifecycleHooks'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/directive_resolver.d.ts (8,27): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵReflectorReader'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/ng_module_resolver.d.ts (8,26): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵReflectorReader'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/pipe_resolver.d.ts (8,22): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵReflectorReader'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/metadata_resolver.d.ts (8,75): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵReflectorReader'.

ERROR in /Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/compiler/src/aot/static_reflector.d.ts (8,10): Module '"/Users/bv/Documents/GDPTAngular/gdpt/node_modules/@angular/core/core"' has no exported member 'ɵReflectorReader'.

【问题讨论】:

  • 您能告诉我们您所做的哪些更改触发了此错误吗?
  • 看起来它正在尝试从“@angular/core/core”而不是“@angular/core”加载资源。我们将需要更多信息。您的导入语句是什么样的?你在用 webpack 吗?
  • 这个问题解决了吗?我有同样的问题。既然这个帖子似乎已经死了,我应该提出一个新问题吗?

标签: angular nodemon


【解决方案1】:

我遇到了这个错误。更新你的 package.json

 "@angular/common": "4.1.3",
 "@angular/compiler": "4.1.3",
 "@angular/compiler-cli": "4.1.3",
 "@angular/core": "4.1.3",

和 npm 安装。

【讨论】:

    【解决方案2】:

    当我将 angular-cli 更新到版本 1.3.0 时,这发生在我身上,@horus 解决方案解决了我的问题。

    以防万一,删除您的 node_modules 文件夹并重新执行“npm install”。

    【讨论】:

    • 感谢 Karma,npm install 修复了它。
    【解决方案3】:

    得到完全相同的错误消息。我的构建问题体现在 quay(docker 注册表)中。问题是角核心包中的破折号(^)。删除破折号后,错误消失并构建完成。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-07
      • 2019-12-05
      • 2017-06-27
      • 1970-01-01
      • 1970-01-01
      • 2018-09-04
      • 2017-01-11
      • 2019-09-08
      相关资源
      最近更新 更多