Open Karan16-prog opened 10 months ago
What's your package.json module
?
And do you have a tsconfig ? If yes, what's the moduleResolution
?
What's your package.json
module
?And do you have a tsconfig ? If yes, what's the
moduleResolution
?
tsconfig : "moduleResolution": "bundler",
No module in package.json Here:
{ "name": "habit-tracker", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-slot": "^1.0.2", "cal-heatmap": "^4.2.4", "canvas-confetti": "^1.9.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "grommet-icons": "^4.12.0", "lucide-react": "^0.312.0", "next": "14.1.0", "next-auth": "^4.24.5", "next-themes": "^0.2.1", "react": "^18", "react-dom": "^18", "tailwind-merge": "^2.2.0", "tailwindcss-animate": "^1.0.7", "zustand": "^4.5.0" }, "devDependencies": { "@types/cal-heatmap": "^3.5.39", "@types/canvas-confetti": "^1.6.4", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10.0.1", "eslint": "^8", "eslint-config-next": "14.1.0", "postcss": "^8", "prisma": "^5.8.1", "tailwindcss": "^3.3.0", "typescript": "^5" } }
In tsconfig.js, change your moduleResolution
to node
or node16
Throwing the following error when importing via
import CalHeatmap from "cal-heatmap";
Running this in next js 14
Version:
"cal-heatmap": "^4.2.4",