Skip to content

Could not find a declaration file for module 'cal-heatmap' #539

@preAGIcoder

Description

@preAGIcoder

Getting this error on import.
import CalHeatmap from 'cal-heatmap';

"next": "^14.2.5"
"typescript": "^5"

Error

Could not find a declaration file for module 'cal-heatmap'. 'd:/mtrack/mtracker-dashboard/node_modules/cal-heatmap/dist/cal-heatmap.esm.js' implicitly has an 'any' type.
  There are types at 'd:/mtrack/mtracker-dashboard/node_modules/cal-heatmap/src/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'cal-heatmap' library may need to update its package.json or typings.ts(7016)

tsconfig.json

{
  "compilerOptions": {
    "downlevelIteration": true,
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "@/*": ["./app/*"]
    },
    "target": "ES2017"
  },
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx",
    ".next/types/**/*.ts",
    "app/(dashboard)/(wrapper)/attendance/[id]/components/ProjectsAndTasksBarChart.jsx"
  ],
  "exclude": ["node_modules"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions