Developer-DAO / DAO-job-board

A job board connecting DAOs with talent.
https://devdao-job-board.vercel.app/
82 stars 34 forks source link

Unhandled Runtime Error TypeError: require.e is not a function #130

Closed carlomigueldy closed 2 years ago

carlomigueldy commented 2 years ago

Describe the bug

Seems like the Next.js dynamic imports isn't working as what we expect, it's throwing me an error on dev.

To Reproduce

Steps to reproduce the behavior:

  1. Run dev server by yarn dev
  2. Go to http://localhost:3000/post-job

Expected behavior

Should open the page without error on dev

Screenshots

If applicable, add screenshots to help explain your problem.

image

carlomigueldy commented 2 years ago

I think this may be happening to me only

carlomigueldy commented 2 years ago

I deleted node_modules and reinstalled dependencies and now it works! 👀

Closing this issue now

kyndaqtepammy commented 2 years ago

I'm actually facing the same issue

AbdUlHamedMaree commented 2 years ago

Me too, sometimes it works, and sometimes it breaks on dev. But the customer reported that this page is throwing an Application error sometimes on production

mlarcher commented 2 years ago

I have the issue too, but only once in a while. It's hard to figure out the conditions to trigger it, but there'e definitely something fishy in there that should be investigated. I suggest to reopen the issue so that it is kept in sight for the team.

ronaldsutantio-acn commented 1 year ago

I am facing the same issue. using this version: "next": "12.1.6", but the error gone when i use async and await method like the following: const DynamicHeader = dynamic(async () => await import('../components/header')) but sometimes it works and sometimes the component not being rendered, works if i refresh the page.

please investigate this issue.

ronaldsutantio-acn commented 1 year ago

deleting node_modules then reinstall the dependencies doesn't help on my end

ydax commented 1 year ago

Having this issue too

devsirius44 commented 1 year ago
  1. Check that you do not have files in models directory that are not exporting anything.
  2. Check that your exports are functions with same parameters as the instance it is being called in the require statement. In any case like mine, I had empty files in my models directory. require(...) is not a function simply because the index logic is iterating over and importing files that do not export anything from the models directory.
f0rmat1k commented 9 months ago

you should reopen this issue. I have the same and reinstalling doesn't help

f0rmat1k commented 9 months ago

i tried to investigate: i get this error image

And look at dynamic source and saw it: image

Looks like it's connected

vucuongkg commented 7 months ago

Having same issue, sometimes happen. Please fix it