Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split-react bug #13

Closed
noams24 opened this issue Jul 18, 2023 · 7 comments
Closed

split-react bug #13

noams24 opened this issue Jul 18, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@noams24
Copy link
Owner

noams24 commented Jul 18, 2023

when trying to run the code:

import Split from 'react-split'

<Split
    className="split"
>
    <div></div>
    <div></div>
</Split>

I get the error:
image

@noams24 noams24 added the bug Something isn't working label Jul 18, 2023
@noams24
Copy link
Owner Author

noams24 commented Jul 30, 2023

fixed

@noams24 noams24 closed this as completed Jul 30, 2023
@sinhaniik
Copy link

hy @noams24 i am going through the same issue could you help me out

I got this error when i am trying to use the react-split

import React from 'react';
import Split from "react-split"
import ProblemStatement from "@/components/problemStatement/problemStatement";

type Props = {};
const Workspace = (props: Props) => {
    return (
        <Split className="split">
            <ProblemStatement/>
            <div>editor</div>
        </Split>
    );
};

export default Workspace

when i run npm run dev an error poped up

Server Error
TypeError: Object prototype may only be an Object or null: undefined
This error happened while generating the page. Any console logs will be displayed in the terminal window.

i did everything which i can like re-install the package , dubugging but i failed to fix this error
here is package.json

{
  "name": "leetcode-cl",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@types/node": "20.4.9",
    "@types/react": "18.2.20",
    "@types/react-dom": "18.2.7",
    "autoprefixer": "10.4.14",
    "firebase": "^10.3.0",
    "next": "13.4.13",
    "postcss": "8.4.27",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-firebase-hooks": "^5.1.1",
    "react-icons": "^4.10.1",
    "react-split": "^2.0.14",
    "react-toastify": "^9.1.3",
    "react-youtube": "^10.1.0",
    "recoil": "^0.7.7",
    "tailwindcss": "3.3.3",
    "typescript": "5.1.6"
  }
}

@noams24
Copy link
Owner Author

noams24 commented Sep 13, 2023

@sinhaniik I forgot how I fixed it, in my package is:

"react-split": "^2.0.14",
"split.js": "^1.6.0",

Check in my package maybe you forgot to install some dependency

In the website https://www.npmjs.com/package/react-split?activeTab=dependencies
they also require "prop type" library

@sinhaniik
Copy link

so what should i do, install these extra packages ?? or delete node modules folder and reinstall all the package ?

@noams24
Copy link
Owner Author

noams24 commented Sep 13, 2023

I think try to install those extra packages

@sinhaniik
Copy link

i just checked my node modules and found that it got both the packages installed prop-types and split.js

@sinhaniik
Copy link

the issue has been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants