Warm tip: This article is reproduced from stackoverflow.com, please click
angular typescript primeng

Cannot find module '@angular/core/src/metadata/lifecycle_hooks'

发布于 2020-03-30 21:16:00

I have got issue of importing primeNG table to my angular project. so i have import the table module to app.module.ts, i have got error.

ERROR in ./node_modules/primeng/components/dropdown/dropdown.js Module not found: Error: Can't resolve '@angular/cdk/scrolling' in 'D:\test angular\primengs\node_modules\primeng\components\dropdown' i 「wdm」: Failed to compile.

ERROR in node_modules/primeng/components/table/table.d.ts(5,27): error TS2307: Cannot find module '@angular/core/src/metadata/lifecycle_hooks'.
Questioner
Raheem Mohamed
Viewed
441
Raheem Mohamed 2019-06-02 01:09

I have found the solution for it. what i have done is Navigate to "/node_modules/primeng/components/table/table.d.ts". and line no 5 have this

import { OnDestroy } from '@angular/core/src/metadata/lifecycle_hooks'; 

i have changed to this.

import {OnDestroy } from '@angular/core';