NotionX / react-notion-x

Fast and accurate React renderer for Notion. TS batteries included. ⚡️
https://react-notion-x-demo.transitivebullsh.it
MIT License
4.87k stars 570 forks source link

Bug: Module not found: Can't resolve 'mem' #299

Closed vutoan266 closed 2 years ago

vutoan266 commented 2 years ago

Hi, I have encountered the issue after installing react-notion-x and importing it into my project like the image below.

image

Not sure why it happens but I tried to install mem package or downgrade version of react-nation-x but it still doesn't work. Please help me. Thank you in advance.

transitive-bullshit commented 2 years ago

Hey @vutoan266, just to help me debug what might be going on for you, what version of Node.js are you using and which package manager + version?

vutoan266 commented 2 years ago

Hi @transitive-bullshit , thanks for your reply. Im working on Node v16.13.0 and npm v8.1.0

transitive-bullshit commented 2 years ago

Is your project open source? I'm not currently able to reproduce the issue.

Does the problem repro if you use yarn instead of npm? I'm not saying you should use yarn; I'm just trying to diagnose what might be going on.

vutoan266 commented 2 years ago

Hi, after try to delete package-lock and yarn lock files and then re-install, but it did not work too.

Sorry, my project is not open source. Here are some config of the project: image image

And here is the error message in Console browser: image

Hope it is useful for you to think about the potential issue orz.

vutoan266 commented 2 years ago

Hey @transitive-bullshit , this bug has been resolved. It happened due to my project uses craco with react-script v4. I just upgrade to v5, and it works well with react-notion-x. Thank you a lot for your help. Can close this issue.

transitive-bullshit commented 2 years ago

Thanks for the update, Tony.

imho, create-react-app is unfortunately very poorly maintained at this point. In the future, I would recommend looking into other options if possible.