TS2307: Cannot find module 'moment' in Angular 8
Dung Do Tien Oct 03 2020 1079
I have a project with Angular 8 and import
moment package. With some information as below:
Angular CLI: 8.0.0 Node: 10.16.0 Angular: 8.0.0 Typescript 3.4.5 Moment version = 2.29.0
But sometimes I clear
node_modules folder and after run
ng serve command I got error TS2307: Cannot find module 'moment'
I don't know how to resolve this issue. Can anyone help with this?
Have 1 answer(s) found.
Manish Kumar Oct 03 2020
I believe that the cause is your deletion
node_modulesfolder so to fix these issues you need run the command below:
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.