tui.calendar icon indicating copy to clipboard operation
tui.calendar copied to clipboard

Unable to load definition files when using moduleResolution: "bundler"

Open black7375 opened this issue 1 year ago • 0 comments

Version

@toast-ui/calendar: 2.1.3
@toast-ui/react-calendar: 2.1.3
typescript: 5.0.4

Test Environment

Linux 6.3.5-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 30 May 2023 13:43:47 +0000 x86_64 GNU/Linux

Current Behavior

If typescript setting(tsconfig.json) moduleResolutionto bundler, the following error occurs.

  • https://github.com/microsoft/TypeScript/issues/52363
  • https://github.com/nhn/tui.editor/issues/2985
yarn run -T tsc --noEmit

src/App.tsx:2:30 - error TS7016: Could not find a declaration file for module '@toast-ui/react-calendar'. '/home/black7375/scheduler/node_modules/.store/@toast-ui-react-calendar-virtual-6b7ed8151a/node_modules/@toast-ui/react-calendar/dist/toastui-react-calendar.mjs' implicitly has an 'any' type.
  There are types at '/home/black7375/scheduler/apps/calendar/node_modules/@toast-ui/react-calendar/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@toast-ui/react-calendar' library may need to update its package.json or typings.

2 import type TUICalendar from "@toast-ui/react-calendar";

Expected Behavior

The module must be able to be found normally when checking of the type checked.

black7375 avatar Jun 02 '23 05:06 black7375