-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade helix-front to Angular 7.2 #2084
Comments
What are Reactive Forms? How do they work? https://angular.io/guide/reactive-forms https://www.digitalocean.com/community/tutorials/angular-reactive-forms-introduction |
encountered this problem https://stackoverflow.com/questions/39152071/cant-bind-to-formgroup-since-it-isnt-a-known-property-of-form and fixed by importing |
It looks like I am unable to test this form change, since I do not have a Helix backend configured. Let's see if there is an alternate way to test this change 🤔 |
passes, so that is a good sign. |
Let's try to upgrade to 7.2 first and then try the form again. Maybe the 7.2 error will be helpful.. |
There might be breaking changes that affect helix-front in TypeScript 3.1: |
Here are the versions we need for the major libraries:
https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3 |
Ah, we see that same Angular dep parsing bug again. Lets's remove the other deps like before to work around this bug. NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@7 update @angular/cli@7 @angular/core@7
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Cannot read property 'split' of null |
Let's try removing these packages temporarily:
based on this old comment: #2053 (comment) |
Now we see: NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@7 update @angular/cli@7 @angular/core@7
./Release/.deps/Release/obj.target/fse/fsevents.o.d.raw
Your global Angular CLI version (7.3.10) is greater than your local
version (6.2.9). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Package "@angular/compiler-cli" has an incompatible peer dependency to
"typescript" (requires ">=3.1.1 <3.3", would install "3.9.10")
Package "@angular/platform-server" has a missing peer dependency of
"@angular/http" @ "7.2.16".
Incompatible peer dependencies found. See above. |
Hooray, it looks like that succeeded. 🎉 We are rewarded with this todo list of missing peer dependency warnings: @angular/cdk@6.1.0 requires @angular/core@>=6.0.0-beta.0 <7.0.0
@angular/cdk@6.1.0 requires @angular/common@>=6.0.0-beta.0 <7.0.0
@angular/flex-layout@6.0.0-beta.18 requires @angular/core@>=6.0.0 <7.0.0
@angular/flex-layout@6.0.0-beta.18 requires @angular/common@>=6.0.0 <7.0.0
@angular/material@6.1.0 requires @angular/core@>=6.0.0-beta.0 <7.0.0
@angular/material@6.1.0 requires @angular/common@>=6.0.0-beta.0 <7.0.0
@ngtools/webpack@6.2.9 requires typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 || ~2.8.0 || ~2.9.0
tsickle@0.32.1 requires typescript@>=2.4.2 <2.10 full log: https://gist.github.com/micahstubbs/3c28537ef245fe664f4572e7874f858d |
Let's try
https://github.com/angular/flex-layout/tags?after=9.0.0-beta.29 Looks like that worked. No complaints from npm on install. |
Next, let's update Here's the commit we want git blame
|
Great, no more peer dep warnings for now. Let's add back those packages we temporarily removed to work around Angular's version parsing bug:
|
Now, we First off, we notice several deprecated package warnings: npm WARN deprecated vis@4.21.0: Please consider using https://github.com/visjs
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. |
Second, we see some peer dep warnings for these packages: npm WARN @swimlane/ngx-datatable@13.1.0 requires @angular/common@<7.0.0
npm WARN @swimlane/ngx-datatable@13.1.0 requires @angular/compiler@<7.0.0
npm WARN @swimlane/ngx-datatable@13.1.0 requires @angular/core@<7.0.0
npm WARN @swimlane/ngx-datatable@13.1.0 requires @angular/platform-browser@<7.0.0
npm WARN @swimlane/ngx-datatable@13.1.0 requires @angular/platform-browser-dynamic@<7.0.0
#
npm WARN @swimlane/ngx-graph@6.0.0 requires @angular/animations@6.x | 7.x | 8.x
npm WARN @swimlane/ngx-graph@6.0.0 requires @angular/common@6.x | 7.x | 8.x
npm WARN @swimlane/ngx-graph@6.0.0 requires @angular/core@6.x | 7.x | 8.x
npm WARN @swimlane/ngx-graph@6.0.0 requires @angular/cdk@6.x | 7.x | 8.x
#
npm WARN @swimlane/ngx-charts@8.1.0 requires @angular/cdk@6.x
npm WARN @swimlane/ngx-charts@8.1.0 requires @angular/common@6.x
npm WARN @swimlane/ngx-charts@8.1.0 requires @angular/core@6.x
npm WARN @swimlane/ngx-charts@8.1.0 requires @angular/animations@6.x
npm WARN @swimlane/ngx-charts@8.1.0 requires @angular/platform-browser@6.x |
|
https://github.com/swimlane/ngx-charts/blame/bde670819a080e4680157185bc2a76b3e4acb847/package.json |
https://github.com/swimlane/ngx-graph/blame/d5a78e45d320ffd976b78624e3d3d0027ca396ce/package.json |
a few new peer dep warnings: @swimlane/ngx-charts@11.0.1 requires @angular/animations@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/cdk@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/core@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/common@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/forms@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/platform-browser@7.x | 8.x
@swimlane/ngx-charts@11.0.1 requires @angular/platform-browser-dynamic@7.x | 8.x let's try:
https://github.com/swimlane/ngx-charts/blame/edbdcc78dec8f59f661065948dbd6c65ffb1f3d2/package.json That did the trick. It seems that |
It looks like it worked. |
Here's what the checklist looks like right now: |
Ah hah! First we have to fix this TypeScript error. Let's do that. client/app/cluster/cluster.component.ts:2:23 - error TS2305: Module
'"/helix/helix-front/node_modules/@angular/flex-layout/flex-layout"'
has no exported member 'ObservableMedia'.
2 import { MediaChange, ObservableMedia } from '@angular/flex-layout';
~~~~~~~~~~~~~~~
[16:06:46] Found 1 error. Watching for file changes. |
Hooray, that fixed it! |
Okay, let's test the upgrade from Angular 6.1 to Angular 7.2.
Helix UI renders with XX errors and YY warning in the browser console. The warning is understandable since the piwik telemetry library is not configured.
|
Ahh, spoke too soon. We have a build error. npm run build
> helix-front@1.2.1 build /helix/helix-front
> rm -rf dist && mkdir dist && ng build --aot --prod && tsc -p server
Date: 2022-05-10T23:18:51.463Z
Hash: 71d2d6da0ff17adc81bd
Time: 13362ms
chunk {0} runtime.80ab492fe3d778817936.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.08a4dae5096073b1e3b1.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills.f2ec7f3c988fb0dd4662.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} styles.d0fa613a0ca6430dc8c0.css (styles) 88.3 kB [initial] [rendered]
ERROR in :
Cannot determine the module for class AxisLabelComponent in
/helix/helix-front/node_modules/
@swimlane/ngx-charts/release/common/axes/axis-label.component.d.ts!
Add AxisLabelComponent to the NgModule to fix it.
Cannot determine the module for class XAxisTicksComponent in
/helix/helix-front/node_modules/
@swimlane/ngx-charts/release/common/axes/x-axis-ticks.component.d.ts!
Add XAxisTicksComponent to the NgModule to fix it.
Cannot determine the module for class XAxisComponent in
/helix/helix-front/node_modules/
@swimlane/ngx-charts/release/common/axes/x-axis.component.d.ts!
Add XAxisComponent to the NgModule to fix it.
Cannot determine the module for class YAxisTicksComponent in
/helix/helix-front/node_modules/
@swimlane/ngx-charts/release/common/axes/y-axis-ticks.component.d.ts!
Add YAxisTicksComponent to the NgModule to fix it.
Cannot determine the module for class YAxisComponent in
/helix/helix-front/node_modules/
@swimlane/ngx-charts/release/common/axes/y-axis.component.d.ts!
Add YAxisComponent to the NgModule to fix it. github issue: swimlane/ngx-charts#829 |
Here's the solution:
|
🎉 build successful
|
Okay, let's test the upgrade from Angular 6.1 to Angular 7.2. once more.
Helix UI renders with XX errors and YY warning in the browser console. The warning is understandable since the piwik telemetry library is not configured.
|
Fix security vulnerabilities in helix-front dependencies. Upgrade helix-front dependencies to improve contributor productivity.
https://update.angular.io/?l=3&v=6.1-7.2
see #2053 for motivation, details, and history.
The text was updated successfully, but these errors were encountered: