Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Js pages breaking with dynamic imports #24739

Closed
amitsingh-quotient opened this issue May 3, 2021 · 4 comments
Closed

Next Js pages breaking with dynamic imports #24739

amitsingh-quotient opened this issue May 3, 2021 · 4 comments
Labels
bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation

Comments

@amitsingh-quotient
Copy link

amitsingh-quotient commented May 3, 2021

What version of Next.js are you using?

latest

What version of Node.js are you using?

v10.24.0

What browser are you using?

chrome

What operating system are you using?

macOs

How are you deploying your application?

other

Describe the Bug

{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"development","isFallback":false,"err":{"name":"ModuleBuildError","message":"Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):\nTypeError [ERR_INVALID_ARG_TYPE]: /repo/components/Redeem/RedeemWrapper.tsx: The \"from\" argument must be of type string. Received type undefined\n at validateString (internal/validators.js:125:11)\n at relative (path.js:1162:5)\n at Import (/repo/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js:25:840)\n at NodePath._call (/repo/node_modules/next/dist/compiled/babel/bundle.js:2194:84530)\n at NodePath.call

Getting this error. Works fine on dev server.

Expected Behavior

Build is passing but page is breaking.

To Reproduce

Dynamic import code is below

const LinkStoreCardWrapper = dynamic(() => import('@components/Redeem/LinkStoreCard/LinkStoreCardWrapper'));

Attached screen shot.
Screenshot 2021-05-03 at 4 28 45 PM

Sometimes it does not render anything on page. Although the build is successful and the application is running.

@amitsingh-quotient amitsingh-quotient added the bug Issue was opened via the bug report template. label May 3, 2021
@ijjk ijjk added the please add a complete reproduction The issue lacks information for further investigation label May 3, 2021
@nicksrandall
Copy link

nicksrandall commented May 3, 2021

Related to #24566

@lindsaylevine
Copy link
Contributor

@amitsingh-quotient where are you deploying your app? and can you provide a reproduction? 🙏 :)

@timneutkens
Copy link
Member

Closing as no reproduction was provided.

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation
Projects
None yet
Development

No branches or pull requests

6 participants