Just the intelisense does not find the module for some reason and gives an error. Else the code works if you import the TreeModule in the AppModule.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
import {TreeModule} from 'primeng/tree';
@NgModule({
imports: [ BrowserModule, FormsModule, BrowserAnimationsModule, TreeModule ],
declarations: [ AppComponent, HelloComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Here is a fork of your stakblitz example that I fixed to work. StackBlitz Link It still shows the error in the editor. I have also added the styles in the styles.css file so it displays correctly.