-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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 'isNextDevCommand' of undefined #13466
Comments
Sounds like the Look for: const app = next() And be sure you're passing const app = next({ dev: boolean }) Relevant examples:
Happy to take a PR giving a better error message when there's bad user input. |
Hey thanks Timer, my server is as follows: Do you see anything that looks wrong here?
|
Without a full demo I can't help trace this down! |
If I understand correctly, you want a better error message when the user passes any variable that isn't a boolean, correct? Cause right now I can pass an integer, string, array, or even an arrow function and I won't see any warnings at all. |
@todortotev I'm not asking for better error message. I'm receiving this error message and I cannot figure out why. @Timer You want to see a demo of the server failing to start and throwing the error message I attached as a screenshot? Happy to attach a gif, but I don't see what value that adds? |
What just happened? Did any of you read this thread? |
**First, apologies for a second PR on the same issue but I was working on this already so I thought I'd push it and let you decide which you want to merge.** The PR is related to [13466](#13466). Based on my research, the error happens if the options are empty, null, or undefined. That's why I have decided that the most proper check would be using the! post-fix expression operator may assert that its operand is non-null and non-undefined. ``if (options == null)`` (Optional) I have also added a warning, which warns the user if the passed "dev" variable is not a boolean. It's my first PR on the "packages" part of the repo so I'd be glad to receive all kinds of critics. If you want me to change or remove anything, I'm open to suggestions. --- Fixes #13466
A full github repository would help |
**First, apologies for a second PR on the same issue but I was working on this already so I thought I'd push it and let you decide which you want to merge.** The PR is related to [13466](vercel#13466). Based on my research, the error happens if the options are empty, null, or undefined. That's why I have decided that the most proper check would be using the! post-fix expression operator may assert that its operand is non-null and non-undefined. ``if (options == null)`` (Optional) I have also added a warning, which warns the user if the passed "dev" variable is not a boolean. It's my first PR on the "packages" part of the repo so I'd be glad to receive all kinds of critics. If you want me to change or remove anything, I'm open to suggestions. --- Fixes vercel#13466
This issue has been automatically closed after 30 days of inactivity with no reproduction. If you are running into a similar issue, please open a new issue with a reproduction. Thank you. |
This closed issue has been automatically locked because it had no new activity for a month. 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
TypeError: Cannot read property 'isNextDevCommand' of undefined options in createServer() do not seem to have the isNextDevCommand property
To Reproduce
Expected behavior
Not this
Screenshots
System information
Additional context
The text was updated successfully, but these errors were encountered: