You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page navigates from / to /component with the dynamically loaded Component rendered (once it is available after the await call)
Error seen:
Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (http://localhost:3000/_next/-/manifest.js:694:30)
at fn (http://localhost:3000/_next/-/manifest.js:115:20)
at SameLoopPromise.cb (http://localhost:3000/_next/-/page/component:653:48)
at SameLoopPromise.runIfNeeded (http://localhost:3000/_next/-/commons.js:41260:12)
at SameLoopPromise.then (http://localhost:3000/_next/-/commons.js:41190:12)
Additional info:
I tried installing some additional Babel plugins to enable async/await with import as instructed here but no luck. The resulting .babelrc config file looks like this:
You can't do this: await import(../lib/components/${name})
the import module needs to be static. Using variables inside is not possible.
Please re-open if the issue persists even after that.
Using
next@beta
Steps to reproduce:
Create a
Index.js
page with a link to aComponent.js
pageCreate a
Component.js
pageAdd the following code in
Component.js
:Run in dev mode (
next
)Navigate from Index page to the Component page
Expected behaviour:
Page navigates from
/
to/component
with the dynamically loaded Component rendered (once it is available after theawait
call)Error seen:
Additional info:
I tried installing some additional Babel plugins to enable async/await with import as instructed here but no luck. The resulting
.babelrc
config file looks like this:Please guide if I have missed something.
The text was updated successfully, but these errors were encountered: