最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - @angular-material-componentsdatetime-picker - '@angularmaterialdatepicker"' has no exporte

programmeradmin7浏览0评论

I'm on angular material 9.2.0. I installed @angular-material-ponents/datetime-picker for dateTimePicker .

I get this errors when I run ng build --prod.

I'm on angular material 9.2.0. I installed @angular-material-ponents/datetime-picker for dateTimePicker .

I get this errors when I run ng build --prod.

Share Improve this question edited Jul 9, 2020 at 15:09 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Jul 9, 2020 at 14:45 Asakkour SoufianeAsakkour Soufiane 5146 silver badges22 bronze badges 5
  • Does it work if you change the import to import {MatDatePickerModule} from '@angular/material/datepicker'; instead of importing DateRange? Typically you need to import the entire module, and this is the correct one inside the Material Docs – Jeremy Commented Jul 9, 2020 at 14:47
  • stackblitz./edit/… – Jeremy Commented Jul 9, 2020 at 14:53
  • Thank you @JeremyLucas for your response, no doesn't work – Asakkour Soufiane Commented Jul 9, 2020 at 14:57
  • Try manually deleting your node_modules folder, package-lock.json , and then restarting your code editor, typing npm install and trying again – Jeremy Commented Jul 9, 2020 at 15:00
  • 1 @AsakkourSoufiane thanks, struggling with this for half an hour now :D – Szörényi Ádám Commented Jul 10, 2020 at 8:47
Add a ment  | 

1 Answer 1

Reset to default 17

I found a solution for that on github, The latest version 4.x.x supports Angular 10. For Angular 9, you should use the version 2.x by using this mand:

npm i @angular-material-ponents/[email protected] --save

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论