To install NgPrime in an application in Angular 5

UI Components for Angular
Post Reply
Posts: 4
Joined: 21 Nov 2018, 14:32

06 Feb 2020, 19:18

I need to install PrimeNg in an Angular 5 application.

With the npm package installer, I executed the following commands:

npm install primeng --save
npm install primeicons --save

Maybe I need to install a version of Primeng compatible with Angular 5 but I don't know the commands npm or how could i do it.

Currently when I issue the command:

ng serve

I get this error in console:

ERROR in src / app / app.module.ts (10,33): error TS2307: Cannot find the module 'primeng / accordion'.

This is the import in the app.module.ts file

import {AccordionModule} from 'primeng / accordion';

If the problem is by the version, where can I find the documentation of the primeng components compatible with Angular 5.

NOTE: Globally the Angular CLI version is for Angular 8 but in the application it is for version 5

Thanks for everything,

Posts: 4
Joined: 21 Nov 2018, 14:32

07 Feb 2020, 13:01

I have seen that on the official Primeng website on the right is the icon with the versions, I will try the v5 ;)

Posts: 29
Joined: 28 Jun 2019, 16:04

14 Feb 2020, 14:44

In package.json file find "primeng": "8.1.0" (my current version) try "primeng": "5.0.0" (for angular 5 version) and install with npm i in command line. You can see versions here: (versions tab) maybe use 5.0.2.

Posts: 4
Joined: 21 Nov 2018, 14:32

14 Feb 2020, 19:37

It works perfect with version 5.0, thanks

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests