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

Unexpected Application Error! Cannot read properties of undefined (reading 'length') #9

Closed
sajadhn1988 opened this issue Jul 6, 2023 · 3 comments

Comments

@sajadhn1988
Copy link

Unexpected Application Error!
Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
at Header (http://localhost:3000/static/js/bundle.js:680:51)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:52269:22)
at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:55555:17)
at beginWork (http://localhost:3000/static/js/bundle.js:56851:20)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:61814:18)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:61083:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:61006:9)
at renderRootSync (http://localhost:3000/static/js/bundle.js:60979:11)
at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:60471:24)
at performConcurrentWorkOnRoot (http://localhost:3000/static/js/bundle.js:60383:26)
💿 Hey developer 👋

You can provide a way better UX than this when your app throws errors by providing your own ErrorBoundary or errorElement prop on your route.

@sajadhn1988
Copy link
Author

Unexpected Application Error! Cannot read properties of undefined (reading 'length') TypeError: Cannot read properties of undefined (reading 'length') at Header (http://localhost:3000/static/js/bundle.js:680:51) at renderWithHooks (http://localhost:3000/static/js/bundle.js:52269:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:55555:17) at beginWork (http://localhost:3000/static/js/bundle.js:56851:20) at beginWork$1 (http://localhost:3000/static/js/bundle.js:61814:18) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:61083:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:61006:9) at renderRootSync (http://localhost:3000/static/js/bundle.js:60979:11) at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:60471:24) at performConcurrentWorkOnRoot (http://localhost:3000/static/js/bundle.js:60383:26) 💿 Hey developer 👋

You can provide a way better UX than this when your app throws errors by providing your own ErrorBoundary or errorElement prop on your route.

consider the following: cartItems && cartItems.length === 0

@bushblade
Copy link
Collaborator

Hi @sajadhn1988
Are you a student of Brads? If so can you post in the course Q&A or over on Brads Discord server please, make sure to include a link to your projects repository.
If you're not a student then can you tell me if this is using the repository code or your own project?

@bushblade
Copy link
Collaborator

Closing due to lack of information and not able to reproduce using repository code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants