Angular 8 Upgrade-ng build命令出现@Angular/platform浏览器错误

Angular 8 Upgrade-ng build命令出现@Angular/platform浏览器错误,angular,Angular,我目前正在将Angular 7应用程序升级到Angular 8,我遇到了一些问题-我以前从Angular 5和Angular 6升级得比较顺利,因此我有一些使用Angular 7的经验 我已经完成了所有步骤,并成功地将所有角度相关性升级到8.1.x。我现在在ViewChild中使用{static:false},并且我的角度材质导入是最新的,使用了更深入的导入 当我尝试使用ng build--aot--prod--build optimizer=false构建应用程序时,就会出现问题。有了这个,我

我目前正在将Angular 7应用程序升级到Angular 8,我遇到了一些问题-我以前从Angular 5和Angular 6升级得比较顺利,因此我有一些使用Angular 7的经验

我已经完成了所有步骤,并成功地将所有角度相关性升级到
8.1.x
。我现在在ViewChild中使用
{static:false}
,并且我的角度材质导入是最新的,使用了更深入的导入

当我尝试使用
ng build--aot--prod--build optimizer=false
构建应用程序时,就会出现问题。有了这个,我得到了以下错误

chunk {0} runtime.e9d4a8365190f9ee7214.js (runtime) 2.21 kB [entry] [rendered]
chunk {1} main.82103d8cb2976079a759.js (main) 6.52 MB [initial] [rendered]
chunk {2} pdfjsWorker.4df5ce1f8ece90d58a9f.js (pdfjsWorker) 741 kB  [rendered]
chunk {3} polyfills.884b7d233bf412d2ec81.js (polyfills) 63.7 kB [initial] [rendered]
chunk {4} polyfills-es5.fb30af840b34e7fa0bb5.js (polyfills-es5) 69.8 kB [initial] [rendered]
chunk {5} styles.169e0b9ec596a5a72c8f.css (styles) 66.5 kB [initial] [rendered]
Date: 2019-07-26T00:55:16.623Z - Hash: 142d65823e318484d40b - Time: 68210ms

ERROR in ./src/app/app.module.ngfactory.js 318:10580-10593
"export 'DOCUMENT' (imported as 'i129') was not found in '@angular/platform-browser'
ERROR in ./node_modules/ng-intercom/fesm5/ng-intercom.js 501:83-91
"export 'DOCUMENT' was not found in '@angular/platform-browser'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.39.3290 build: `npx ng build --aot --prod --build-optimizer=false && npx tsc -p tsconfig.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.39.3290 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我真的不确定整个
导出文档的问题是怎么回事

下面是我运行
ng--version
时得到的结果

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

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.801.2
@angular-devkit/build-angular      0.801.2
@angular-devkit/build-optimizer    0.801.2
@angular-devkit/build-webpack      0.801.2
@angular-devkit/core               8.1.2
@angular-devkit/schematics         8.1.2
@angular/cdk                       8.1.1
@angular/http                      7.2.15
@angular/material                  8.1.1
@angular/material-moment-adapter   8.1.1
@ngtools/webpack                   8.1.2
@schematics/angular                8.1.2
@schematics/update                 0.801.2
rxjs                               6.5.2
typescript                         3.4.5
webpack                            4.35.2

文档不再位于
@angular/platform浏览器中
它位于
@angular/common

import { DOCUMENT } from '@angular/common'<----replace;

从“@angular/common”导入{DOCUMENT}文档不再位于
@angular/platform浏览器中
它位于
@angular/common

import { DOCUMENT } from '@angular/common'<----replace;

import{DOCUMENT}来自“@angular/common”的依赖项ng对讲机似乎正在从平台浏览器导入文档,而现在应该从“@angular/common”导入


尝试查看是否有支持Angular更新版本的新版本ng intercom,然后再次尝试运行ng update。

看起来依赖项ng intercom正在从平台浏览器导入文档,而现在应该从“@Angular/common”导入


尝试查看是否有新版本的ng对讲机支持更新版本的Angular,然后再次尝试运行ng update。

我之前在寻找解决方案时遇到此更改,但问题是我的应用程序中没有该导入。我之前在寻找解决方案时遇到此更改,但问题是我的应用程序中没有该导入。将ng intercom更新为最新版本解决了此问题。谢谢将ng对讲机更新为最新版本解决了此问题。谢谢