NativeElement issue with chart.js

i am following this tutorial: Adding Responsive Charts & Graphs to Ionic Applications | Josh Morony - Learn how to build mobile apps with web tech (provided by my uni course) and im getting an issue with the native element: cannot read property ‘nativeelement’
if anyone knows what to do please let me know

Try this:

implements AfterViewInit


 @ViewChild("barCanvas", { static: true }) barCanvas;


 this.barchart = new Chart(this.barCanvas.nativeElement, {

Tested with:
Angular 15.2
Ionic/angular 7.0.4
Chartjs 3.9.1