Skip to content

[BUG] Do not add <script> tags using next/head #4517

@sauhardh

Description

@sauhardh

Describe the bug.

This Hydration Error occurs on local development.
npm run dev

Though this error may not be such big to worry about, It Can be fixed as a diagnostic message has shown--by replacing script tag with Script from next/script.

next/script has benefits like loading only once and has claimed to be more optimized than the regular one.

I have tried this and after that, it has stopped complaining.

Expected behavior

I can drop a PR if you allow

Screenshots

Image

How to Reproduce

local run: npm run dev

🖥️ Device Information [optional]

  • Operating System (OS): Arch(Omarchy)
  • Browser: brave
  • Browser Version:

[Brave 1.83.120 (Official Build) (64-bit)]
Chromium: 141.0.7390.122

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions