omnisat / lasereyes-mono

https://lasereyes.build
MIT License
7 stars 3 forks source link

[Bug]: With Nextjs15: TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') #276

Open plvo opened 1 week ago

plvo commented 1 week ago

Describe the bug Hey, I got this error #257, so I decided to update nextjs to the latest version (15), but I got another runtime error.

To Reproduce Steps to reproduce the behavior:

  1. Update to Nextjs 15

Expected behavior

Screenshots image

Environment (please complete the following information): The package.json :

{
   // ...
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "seed": "bun prisma/seed.ts"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.9.0",
    "@omnisat/lasereyes": "^0.0.126",
    "@radix-ui/react-avatar": "^1.1.1",
    "@radix-ui/react-checkbox": "^1.1.2",
    "@radix-ui/react-dialog": "^1.1.2",
    "@radix-ui/react-dropdown-menu": "^2.1.2",
    "@radix-ui/react-hover-card": "^1.1.2",
    "@radix-ui/react-icons": "^1.3.0",
    "@radix-ui/react-label": "^2.1.0",
    "@radix-ui/react-popover": "^1.1.2",
    "@radix-ui/react-scroll-area": "^1.2.0",
    "@radix-ui/react-select": "^2.1.2",
    "@radix-ui/react-separator": "^1.1.0",
    "@radix-ui/react-slot": "^1.1.0",
    "@radix-ui/react-switch": "^1.1.1",
    "@radix-ui/react-tabs": "^1.1.1",
    "@radix-ui/react-toast": "^1.2.2",
    "@radix-ui/react-tooltip": "^1.1.3",
    "@tanstack/react-query": "^5.59.15",
    "bcrypt": "^5.1.1",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "lucide-react": "^0.453.0",
    "next": "15.0.3",
    "next-auth": "^4.24.8",
    "next-themes": "^0.3.0",
    "react": "19.0.0-rc-66855b96-20241106",
    "react-dom": "19.0.0-rc-66855b96-20241106",
    "react-hook-form": "^7.53.0",
    "tailwind-merge": "^2.5.4",
    "tailwindcss-animate": "^1.0.7",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@prisma/client": "^5.21.1",
    "@tanstack/eslint-plugin-query": "^5.59.7",
    "@types/bcrypt": "^5.0.2",
    "@types/node": "^20",
    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
    "eslint": "^8",
    "eslint-config-next": "15.0.3",
    "postcss": "^8",
    "prisma": "^5.21.0",
    "tailwindcss": "^3.4.1",
    "typescript": "^5"
  },
  "overrides": {
    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
  }
}

Additional context the provider.tsx :

"use client";

import * as React from "react";
import { SessionProvider } from "next-auth/react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import {
  LaserEyesProvider,
  MAINNET,
} from "@omnisat/lasereyes";

const queryClient = new QueryClient();

export function Providers({ children, ...props }: ThemeProviderProps) {
  return (
    <NextThemesProvider defaultTheme="system" {...props}>
      <LaserEyesProvider config={{ network: MAINNET }}>
        <SessionProvider>
          <QueryClientProvider client={queryClient}>
            {children}
          </QueryClientProvider>
        </SessionProvider>
      </LaserEyesProvider>
    </NextThemesProvider>
  );
}
plvo commented 1 week ago

just seen that it's a duplicate of issue #254

hathbanger commented 6 days ago

lets merge #272, @ufe-pr was working that issue