Angularで「error TS2305: Module ‘”@fullcalendar/core”‘ has no exported member ‘VerboseFormattingArg’.」

今回はAngular+fullcalendar環境で下記のエラーが起きたときの対処法についてご紹介いたします。

Angularのバージョンは17.3.11で、fullcalendarのバージョンは6.1.14です。



Angularで「error TS2305: Module '"@fullcalendar/core"' has no exported member 'VerboseFormattingArg’.」

fullcalendarのバージョンアップで5.11.3から6.1.14に上げたときにこのエラーが起きました。

結論を言うと、下記のように「@fullcalendar/core」ではなく「@fullcalendar/core/internal」をインポートするようにしましょう。

import { VerboseFormattingArg } from '@fullcalendar/core';

import { VerboseFormattingArg } from '@fullcalendar/core/internal';

公式のfullcalendarのバージョン5から6に上げる際のガイドにも記載があります。
https://fullcalendar.io/docs/upgrading-from-v5

終わりに

今回はAngular+fullcalendar環境で冒頭のエラーが起きたときの対処法についてご紹介いたしました。

最後までお読みいただきありがとうございます。
よろしければブログやTwitterでのシェアをお願いしております。
コメントもお待ちしております。
誤植や勘違いなどございましたらコメント欄にて教えていただけると幸いです。

直接契約ができるフリーランスエージェント「エンハンス」を立ち上げました。
詳しくは下記LPをご参照ください。
https://enhance.decryption.co.jp/

Youtubeチャンネル開設いたしました。
チャンネル登録者1000人を目指しているので、良いと思った方はチャンネル登録をお願いしたいです。
https://www.youtube.com/channel/UC219XhmSRxmXltTy6COxSMw






Angular

Posted by ちこ