Home  >  Forum  >  Angular
Post New Query

Error: Cannot find module 'moment' or its corresponding type declarations



Asked on June 30, 2020
I am creating Angular Material Datepicker using MatMomentDateModule.

I got this error, how to resolve?


ERROR in node_modules/@angular/material-moment-adapter/adapter/moment-date-adapter.d.ts:10:24 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

10 import { Moment } from 'moment';
                          







Replied on June 30, 2020
MatMomentDateModule uses moment.js. You need to install moment.js

>npm install moment --save

Then run. 


Write Answer








©2020 concretepage.com | Privacy Policy | Contact Us