Cannot find module '@angular/material-moment-adapter'
Just run this command using npm for installing @angular/material-moment-adapter:
npm i @angular/material-moment-adapter
Since @angular/material-moment-adapter
requires Angular v5 and up and was only introduced recently (in 5.0.0-rc0
), you have to update your dependencies as follows:
npm install -s @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@'^5.0.1' rxjs@'^5.5.2'
npm install -E [email protected]
Adapted from https://update.angular.io
EDIT:
Note: As of NPMJS 5, you no longer have to specify the --save
flag as this is the default option (see this blog post on changes to NPMJS 5 for more info (under the breaking changes section)):
npm i @angular/{animations,common,compiler,core,forms,platform-browser,platform-browser-dynamic,router}@latest rxjs@latest moment
npm i -D [email protected]
(P.S. The -D
flag is an alias of --save-dev
)
For those, like me, that also reached this question and already have the lastest @angular 5+.
Don't forget to install Moment.js: npm i moment
(as I did )