collaborative-editor icon indicating copy to clipboard operation
collaborative-editor copied to clipboard

TypeError: Cannot read properties of undefined (reading 'resolveMentionSuggestions')

Open Madhannmady07 opened this issue 1 year ago • 14 comments

At the timestamp of 1:58:38, the editor part that is the place where we edit our doc is available for the instructor, but whereas in my case i wasnt able to get that righly instead of that i was thrown with an error saying , TypeError: Cannot read properties of undefined (reading 'resolveMentionSuggestions')

help me to resolve this error .

Screenshot 2024-07-27 100243

Madhannmady07 avatar Jul 27 '24 04:07 Madhannmady07

Just delete the node modules and install them again. Also make sure that all liveblocks dependencies in package.json should be of same version. It will fix the issue.

omkarpawar7000 avatar Jul 27 '24 18:07 omkarpawar7000

I have done what u told , but still the error is not rectified sadly

is there anything which causes this problem >? or should i do anyother to solve this problem ?

Madhannmady07 avatar Jul 28 '24 05:07 Madhannmady07

try copying and pasting the package.json file of this repo and then run npm install

omkarpawar7000 avatar Jul 28 '24 05:07 omkarpawar7000

since i copy paste the pacakge.json code , it shows me with this error `Conflicts:

  • @liveblocks/core 2.3.0 (esm) (already loaded)
  • @liveblocks/core 2.4.0 (esm) (trying to load this now)`

earlier i had 2.4.0 version , now i changed to 2.3.0

still the resolveMentionSuggestions is there along with this

Madhannmady07 avatar Jul 28 '24 05:07 Madhannmady07

i had the same error. the last thing i did is that i cloned this repo and replaced my env.local file with my secret key and auth keys

omkarpawar7000 avatar Jul 28 '24 05:07 omkarpawar7000

i had the same error. the last thing i did is that i cloned this repo and replaced my env.local file with my secret key and auth keys

bruh , are u serious ? i think u are making fun out of me ? u may not even got this error, but for funny sake u are saying this ig.

Madhannmady07 avatar Jul 28 '24 05:07 Madhannmady07

now at last, i got this error Clerk - DEPRECATION WARNING: "clerkClient singleton" is deprecated and will be removed in the next major release. Use clerkClient() as a function instead. , this will solve the problem ig .

but idk how to clear this.

Madhannmady07 avatar Jul 28 '24 05:07 Madhannmady07

bro i told you to clone becoz the peer dependencies will be installed as in the original repo of video just like the instructor did and the packages required will be installed same as that required for the project

omkarpawar7000 avatar Jul 28 '24 06:07 omkarpawar7000

now at last, i got this error Clerk - DEPRECATION WARNING: "clerkClient singleton" is deprecated and will be removed in the next major release. Use clerkClient() as a function instead. , this will solve the problem ig .

but idk how to clear this.

this will remain the same you can run npm ls to check the liveblocks versions if they are same or not

omkarpawar7000 avatar Jul 28 '24 06:07 omkarpawar7000

image

see this my one is running well now

omkarpawar7000 avatar Jul 28 '24 06:07 omkarpawar7000

I also got this error, my liveblocks related dependancies are

    "@liveblocks/react": "^2.4.0",
    "@liveblocks/react-lexical": "^2.0.3",
    "@liveblocks/react-ui": "^2.4.0",
    "@liveblocks/yjs": "^2.0.3",

barbaldo avatar Aug 06 '24 08:08 barbaldo

I also got this error, my liveblocks related dependancies are

    "@liveblocks/react": "^2.4.0",
    "@liveblocks/react-lexical": "^2.0.3",
    "@liveblocks/react-ui": "^2.4.0",
    "@liveblocks/yjs": "^2.0.3",

@username

Looking at your package list, the important package is set to 2.4.0. The correct version is 2.3.0

This issue seems to be related to the version of the dependency packages. Please try removing the existing dependencies and reinstalling the correct versions as follows:

  1. Copy and paste the content of the package.json file from the collaborative-editor directory:

    {
      "dependencies": {
        "@liveblocks/client": "^2.3.0",
        "@liveblocks/node": "^2.3.0",
        "@liveblocks/react": "^2.3.0",
        "@liveblocks/react-lexical": "^2.3.0",
        "@liveblocks/react-ui": "^2.3.0"
      }
    }
    
  2. Remove the node_modules folder and package-lock.json file:

    rm -rf node_modules package-lock.json
    
  3. Install the correct versions of the dependencies:

    npm install
    

If the dependencies continue to install version 2.4.0, forcibly install version 2.3.0 as follows: bash npm install @liveblocks/[email protected] @liveblocks/[email protected] @liveblocks/[email protected] @liveblocks/[email protected] @liveblocks/[email protected]

Updating the dependencies with the above versions should resolve the issue. Please try reinstalling with these versions.

yunjjang99 avatar Aug 07 '24 04:08 yunjjang99

Exactly i had did the same too. My one got resolved during the first attempt when i was writing the code.

omkarpawar7000 avatar Aug 08 '24 05:08 omkarpawar7000

Thank you very much, @yunsoShin. I had the same error, and now it's resolved thanks to your helpful answer!

truongtuanhuy268 avatar Sep 19 '24 09:09 truongtuanhuy268