Error while adding create a component using Primeng

Asked

Viewed 42 times

0

Speaks blz guys? I’m learning primeng but I can not run my project. I did the correct steps of the documentation and I see that I have error here but I could not solve.

Steps I did was: I installed primeNg and primeicons.

Adicionei no package.json:

"styles": [
          "node_modules/primeicons/primeicons.css",
          "node_modules/primeng/resources/themes/saga-blue/theme.css",
          "node_modules/primeng/resources/primeng.min.css", 
Adicionei um componente no html

my HTML

<button pButton type="button" label="Click" ></button>

module.app

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {ButtonModule} from 'primeng/button';



@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule, AppRoutingModule, ButtonModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

When running the project, I get this error:

Error: node_modules/primeng/ripple/ripple.d.ts:26:21 - error TS2694: Namespace '"/Users/daysonrodrigues/Documents/algamoney/algamoney-api/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

26     static ɵinj: i0.ɵɵInjectorDeclaration<RippleModule>;
                   ~~~~~~~~~~~~~~~~~~~~~


Error: ./node_modules/primeng/fesm2015/primeng-button.js 218:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'
  • Probably the q version is using is not compatible. What is your angular version and the primeng version?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.