ShadCN UI 대시보드 dashboard-page1.tsx 추가
1. import { IconTrendingDown, IconTrendingUp } from "@tabler/icons-react" 오류 발생하는 경우
아래 명령어로 @tabler/icons-react 설치
npm install @tabler/icons-react
2. import { restrictToVerticalAxis } from "@dnd-kit/modifiers" 오류 발생하는 경우
아래 명령어로 @dnd-kit/modifiers 설치
npm install @dnd-kit/modifiers
3. import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable" 오류 발생하는 경우
아래 명령어로 @dnd-kit/sortable 설치
npm install @dnd-kit/sortable
4. import { CSS } from "@dnd-kit/utilities" 오류 발생하는 경우
아래 명령어로 npm install @dnd-kit/utilities 설치
npm install @dnd-kit/utilities
5. import {
ColumnDef,
ColumnFiltersState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
Row,
SortingState,
useReactTable,
VisibilityState,
} from "@tanstack/react-table" 오류 발생하는 경우
아래 명령어로 @tanstack/react-table 설치
npm install @tanstack/react-table
이래도 오류가 해결이 안되면, 아래와 같이 type 붙이기.
[AS-IS]
import {
ColumnDef,
ColumnFiltersState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
Row,
SortingState,
useReactTable,
VisibilityState,
} from "@tanstack/react-table"
[TO-BE]
import {
type ColumnDef,
type ColumnFiltersState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
type Row,
type SortingState,
useReactTable,
type VisibilityState,
} from "@tanstack/react-table"
import {
ColumnDef,
ColumnFiltersState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
Row,
SortingState,
useReactTable,
VisibilityState,
} from "@tanstack/react-table"
[TO-BE]
import {
type ColumnDef,
type ColumnFiltersState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
type Row,
type SortingState,
useReactTable,
type VisibilityState,
} from "@tanstack/react-table"
6. import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart" 오류 발생하는 경우
npm install @/components/ui/chart
아래와 같이 type 붙이기.
[AS-IS]
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart"
[TO-BE]
import {
type ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart"
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart"
[TO-BE]
import {
type ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart"