Next.js Discord

Discord Forum

Router Parallel - modal - bug?

Unanswered
Florida White posted this in #help-forum
Open in Discord
Florida WhiteOP
Hello, I have been testing parallel routers for a few days and found some problems.

First thing:
I created @modal in folder [lang] ,@modal is siblings to rootLayout.
In nextjs v 13.4.19 its worked good ,but when i changed version to 13.5.6 or 14 i have this communicat:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.


If i delete that folder everything is good.

Second thing:
The modal only works on localhost, when I upload it to the hosting I get this error

TypeError: e is not iterable
    at u (596-198f2a4a628c6b7c.js:1:33991)
    at e (596-198f2a4a628c6b7c.js:1:33838)
    at e (596-198f2a4a628c6b7c.js:1:33866)
    at O (596-198f2a4a628c6b7c.js:1:52701)
    at s (596-198f2a4a628c6b7c.js:1:63060)
    at 596-198f2a4a628c6b7c.js:1:67639
    at Object.rv [as useReducer] (fd9d1056-89a46b595ea10bfe.js:9:40981)
    at t.useReducer (596-198f2a4a628c6b7c.js:17:7400)
    at o (596-198f2a4a628c6b7c.js:1:67624)
    at M (596-198f2a4a628c6b7c.js:1:10000)


Third thing:

In documentation is wrote when I need dismissing a modal I can use Link component ,but when i use link component instead router.back my modal closed ,but when i click again dont show on even though path changed.

Ah and one more thing. First and second thing is only when i create @modal sibling to rootlayout. If i create in other part of application and for another layout(not root layout) i dont have that problems

Have you some ideas?

1 Reply

Florida WhiteOP
I solved second problem. I made redeploy. Added fresh node_modules and it works