-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Breaking API change in types from 12.0.4 to 12.0.5 #32123
Labels
bug
Issue was opened via the bug report template.
Comments
tbergquist-godaddy
added a commit
to tbergquist-godaddy/monorepo
that referenced
this issue
Dec 4, 2021
next 12.0.5 breaks typescript typecheck vercel/next.js#32123
kodiakhq bot
pushed a commit
to tbergquist-godaddy/monorepo
that referenced
this issue
Dec 4, 2021
next 12.0.5 breaks typescript typecheck vercel/next.js#32123
3 tasks
kodiakhq bot
pushed a commit
that referenced
this issue
Dec 4, 2021
This reverts the type for the `conf` field in `ServerOptions` isn't changed to require all `NextConfig` values as this is a breaking change from what was previously required. We should investigate making sure this field is normalized when it is provided via a user. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Fixes: #32123 x-ref: #31858
Hi, this has been updated in |
Thanks for the quick fix! |
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. |
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
This reverts the type for the `conf` field in `ServerOptions` isn't changed to require all `NextConfig` values as this is a breaking change from what was previously required. We should investigate making sure this field is normalized when it is provided via a user. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Fixes: vercel#32123 x-ref: vercel#31858
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12.0.5
What version of Node.js are you using?
14.18.1
What browser are you using?
Not applicable
What operating system are you using?
macOS
How are you deploying your application?
using custom server
Describe the Bug
The update from
12.0.4
to12.0.5
including a breaking API change when calling thecreateServer
function.In 12.0.4 with TypeScript this compiles fine:
In version 12.0.5 the above generates the following TypeError:
Expected Behavior
Existing
createServer
configuration would continue to work in patch versions, especially when the release notes say "This upgrade is completely backward-compatible and recommended for all users on versions below 12.0.5. A backport of the patch to Next.js 11 will be available later today."To Reproduce
npx create-next-app@latest --typescript
Change version of
next
andeslint-config-next
in generatedpackage.json
to 12.0.4Run
yarn
to get the downgraded versionCreate
server.ts
with following contentsExecute
yarn run tsc
to check types, there should be no type errorsChange version of
next
andeslint-config-next
in generatedpackage.json
to 12.0.5Run
yarn
to get the version 12.0.5Execute
yarn run tsc
to check types, receiving the following errorThe text was updated successfully, but these errors were encountered: