Reputation: 11
In NextJS, I am facing issue this "TypeError: webpack_require.nmd is not a function",
it only happens on the server, but on local, I am not getting this error. I have noted two things during facing this issue.
webpack-hmr taking too much time to load almost 45 sec in local, but when it comes on the server, its status remains pending for so long.
When I see in the network, this. "_app.js?ts=1680289247269" chunks data takes so much time to load almost 65mb data.
I am using MUI5, and when the website loads for the first time, it lands on the login page.
On local, I am facing one more issue when the first time login page loads; it loads between 45 sec - 65 sec.
I tried to change my next.config file, but still getting this error and slow loading of the login page.
Upvotes: 1
Views: 1109
Reputation: 191
I doubt this is a permanent solution, but I came across this problem today - restarting the dev server worked for me (re-running npm run dev
).
Upvotes: 1