我们有一个有角度的应用程序,它利用了整个公司共享的组件库(CommonUiControls)。
自从升级到angular 6以来,我们在ng build和ng build --prod中遇到了几个问题。构建总是成功完成,但是我们在结果页面中看到的问题包括以下症状。
第一个问题是,该构建有时会导致应用程序在changeDetectorRef.detectChanges调用之后停止考虑所有行。
没有控制台错误,这些代码仅决定其中之一之后的所有代码 呼叫不需要执行。
此问题在它发生的任何内部版本中都是一致的,但仅在大约50%的内部版本上才间歇出现。生成的post build .js文件之间的差异表明两者之间没有差异。
对我们的组件库进行更改时,npm install命令不会使用该库的最新版本进行更新。可以通过在每个版本中都删除package-lock.json来绕开它。
即使新库成功更新到项目node_modules,ng build命令的输出有时也会使用未更改的库。目前尚不清楚这怎么可能,我们找不到在文件系统上任何地方使用的代码。
建议于
系统信息
npm --version
5.6.0
ng --version
Angular CLI:6.0.8
节点:10.2.1
操作系统:linux x64
角度:6.0.6
...动画,通用,编译器,compiler-cli,核心,表格
... http,平台浏览器,平台浏览器动态
...平台服务器,路由器
软件包版本
@ angular-devkit / architect 0.6.8
@ angular-devkit / build-angular 0.6.8
@ angular-devkit / build-optimizer 0.6.8
@ angular-devkit / core 0.6.8
@ angular-devkit / schematics 0.6.8
@ angular / cli 6.0.8
@ ngtools / webpack 6.0.8
@ schematics /角度0.6.8
@ schematics /更新0.6.8
rxjs 6.2.1
打字稿2.7.2
webpack 4.8.3
{
"name": "angular-main-ui",
"version": "1.0.0",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.0.3",
"@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/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/platform-server": "^6.0.3",
"@angular/router": "^6.0.3",
"CommonUiControls": "file:../CommonUiControls-1.0.0.tgz",
"bootstrap": "^3.3.7",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.7",
"jquery": "^3.3.1",
"material-design-icons": "^3.0.1",
"moment": "^2.22.2",
"ng2-file-upload": "^1.3.0",
"ngx-bootstrap": "^2.0.5",
"ngx-page-scroll": "^5.0.0",
"rxjs": "^6.2.0",
"rxjs-compat": "^6.0.0-rc.0",
"ts-helpers": "^1.1.1",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.20"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.6",
"@angular/cli": "^6.0.7",
"@angular/compiler-cli": "^6.0.3",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.112",
"codelyzer": "^4.3.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.1.2",
"karma-remap-istanbul": "^0.2.1",
"ng2-bs3-modal": "^0.13.0",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.3.0",
"typescript": "~2.7.2"
}
}