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

NullReferenceException: "packages/next/client/head-manager.ts" #31060

Closed
furcan opened this issue Nov 5, 2021 · 1 comment · Fixed by #31061
Closed

NullReferenceException: "packages/next/client/head-manager.ts" #31060

furcan opened this issue Nov 5, 2021 · 1 comment · Fixed by #31061
Labels
bug Issue was opened via the bug report template.

Comments

@furcan
Copy link
Contributor

furcan commented Nov 5, 2021

What version of Next.js are you using?

12.0.3

What version of Node.js are you using?

16.13.0

What browser are you using?

Chrome

What operating system are you using?

Windows

How are you deploying your application?

next export

Describe the Bug

NullReferenceException

There was another NullReferenceException in this file(packages/next/client/head-manager.ts) that has been resolved before. The related issue and the PR are below.

Issue: #30604
PR: #30919

I did not understand the point of using exclamation marks for the possible Null Reference Exceptions instead of question marks as a shorthand?

I will refactor the file again that the file name has been provided in the issue title, and will open another PR.
Or, maybe the Next.js team can be considered to refactor the related file from scratch as well.

Thanks in advance.

Expected Behavior

Should work like a charm.

To Reproduce

Using next/head within any of the components and deploying the app with next export.

import Head from 'next/head';
@furcan furcan added the bug Issue was opened via the bug report template. label Nov 5, 2021
styfle added a commit that referenced this issue Nov 8, 2021
* fix(#31060): NullReferenceException

Related Issue: #31060

* Type 'undefined' is not assignable to type 'Element | null'

Co-authored-by: Steven <steven@ceriously.com>
@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
natew pushed a commit to natew/next.js that referenced this issue Feb 16, 2022
* fix(vercel#31060): NullReferenceException

Related Issue: vercel#31060

* Type 'undefined' is not assignable to type 'Element | null'

Co-authored-by: Steven <steven@ceriously.com>
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants