简体   繁体   中英

Cannot find module '@angular/core' after upgrading to angular 9 and primeng 9

I have upgraded to Angular 9, and updated PrimeNG to verion 9 . After I do ng build, I get the following errors, Cannot find module '@angular/core' in one of primeng library components. Both angular and primeng are version 9.0.0, what can be an issue?

在此处输入图片说明

在此处输入图片说明

删除 node_modules 和 package-lock.json 并重复安装

After you upgrade to primeng 9, check your project to see if it has old references to primeng components.

As an example please see attached, there are others that you need to change too, just look for them. Once you give correct reference, it will fix those errors for you. Another example is "growl" is depricated, change it to "toast".

Also make sure you import primeng modules correctly too.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM