Reputation: 117
When first loading up my page(in dev mode) this error occurs
Unhandled Runtime Error TypeError: require.e is not a function
8 | import {VideoType} from "../../component/VideoPlayer/Types";
9 |
> 10 | const Location = dynamic(() => import('../../component/Location').then((comp) => comp.Location), {
| ^
11 | ssr: false,
12 | })
This issue goes away after the 2nd reload How do I get around this issue? Thanks for assisting
Upvotes: 3
Views: 1282
Reputation: 41
I ran into the same problem and I learned later that the import() function returns a promise and in production server it can (and does) fail. (I hope that someone else approves or correct this if I am mistaken)
So you can actually Alert to user failure and try to handle and catch the error .
This article helped in my case
Upvotes: 0