Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Next.js TypeError: Right-hand side of 'instanceof' is not callable #271

@jinsley8

Description

@jinsley8

New Bug Report

Issue Description

Updating to the newest release react-moralis: 1.4.1 along with moralis-v1: 1.11.0 results in a TypeError in Next.js.

Steps + code to reproduce

Create a new Next.js install and make sure the following versions are installed:

"moralis-v1": "1.11.0",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-moralis": "1.4.1"

Actual Outcome

This will cause the following error message:
TypeError: Right-hand side of 'instanceof' is not callable

Expected Outcome

This TypeError is not expected and not reproducable in the previous versions of moralis and react-moralis

Reverting back to this resolves it:

"moralis": "1.11.0",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-moralis": "1.4.0"

Environment

Server

  • Moralis server version: v0.0.383

Client

  • react-moralis version: 1.4.1
  • Moralis SDK version: 1.11.0
  • Operating system: MacOS Monterrey 12.4
  • Browser: Brave - Version 1.40.113 Chromium: 103.0.5060.114 (Official Build) (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions