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
TypeError: Cannot read property 'map' of undefined at Server.generateRoutes #9970
Comments
|
Same error happen. Temporary I've resolve the issue by decrease next.js version to 9.1.14 |
|
This error occued in next.js 9.1.6 too. |
|
A full reproduction is needed. |
|
Facing this issue as well and downgraded to |
|
@adamthewan please provide a full reproduction otherwise your comment really is not helpful in resolving the issue. |
|
Yup sorry about that. My build environment is inside System informationOS: Node.js 10 (Beta) My build is something like this: Describe the bugWhen accessing the endpoint, the server will crash with this log: |
|
I'm going to post the exact same reply. This time with bold text. Please provide a full reproduction otherwise the comment really is not helpful in resolving the issue. |
|
facing the same issue |
|
@vaibhav269 this is really not helpful in resolving the issue. As said:
|
|
This is the package.json file The server file is Everything works fine in local server but when i try to host the application to the server in production mode i get this error on running 'npm run start' Fixed the issue by sticking to the version v9.4.1 i.e by removing the '^' in "next": "^9.1.4" in package.json Hope that helps :) |
|
Please provide a full reproduction including all code. Just 2 files is not enough. |
|
Sorry but i can't reveal the full code. Try it out according to me given files are enough to reproduce the error.
You will probably get the error |
|
@vaibhav269 Just tried it with the provided files and steps and I could not reproduce. |
|
I was able to fix the issue simply with I will say one thing however, there's a lot of issues I've been having with next.js and whenever I find the bug posted here the development team always seem to deny any issues. In this case, it's not really a bug with next.js, but perhaps advising to clear the cache and rebuild would be more constructive than "Cannot reproduce. Next.js can do no wrong." |
We don't deny issues. I've already spent over an hour on this particular issue without being able to reproduce as no reproduction was provided. We ask for a reproduction so that we can add a test in our test suite to ensure it doesn't happen again. Eg in this case I've asked for a full reproduction 5 times and 1 time it was provided, tried to reproduce based on the steps provided and couldn't reproduce so posted back. Didn't hear back from anyone experiencing the issue since.
Specifically "Next.js can do no wrong" I've never said that, I've only asked for a reproduction so that we can actually solve the issue you're experiencing. |
|
Sorry, jump to this. |
I'm facing the same issue on Vercel. I'm trying to map over an array in getStaticPaths and it throws the same error. |
|
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. |
Bug report
Describe the bug
I've been using nextjs with typescript to build a web app (based off of the example at https://github.com/mui-org/material-ui/tree/master/examples/nextjs-with-typescript). However, when I deploy my app to an AWS elastic beanstalk instance, I get a strange error that breaks my app.
next startdoes not run correctly. I cannot reproduce this locally, only when I deploy to AWS's elastic beanstalk.Stack trace:
To Reproduce
Deploy nextjs app with typescript to elastic beanstalk instance
Expected behavior
The app should just run
next startnormally.System information
The text was updated successfully, but these errors were encountered: