0
1

More than 1 year has passed since last update.

Next.js Headタグの使い方

Last updated at Posted at 2022-11-03

Headタグの書式ミスでvercelデプロイ失敗

Nextで作成したWebアプリケーションをVercelでデプロイしたのですが、

react_devtools_backend.js:4026 TypeError: Cannot read properties of null (reading 'content')
...
...

ようなエラーが出てしまい、「サーバーサイド側で記述をミスったのかな...」
と思っていたのですが、色々見た結果nextのheadタグの書式で間違っていることが判明、、

<Head>
    <h1>
        <title>ログインページ</title> 
    <h1>
</Head>

このような記述をしていたのが原因でした。omg

正しくは以下ですね↓

<Head>
        <title>ログインページ</title> 
</Head> 

next初学者の方ご参考までに、以上

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1