Qiita Conference 2025

成瀬允宣 (@nrslib)

設計の本質:コード、システム、そして組織へ

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Chakra UI v3 でWrapのインポートがエラーになる

Posted at

事象

下記のようなエラー分がなぜか表示される。
image.png
なんで…?
package.jsonのdependenciesもちゃんとインストールされている。

package.json
  "dependencies": {
    "@chakra-ui/icons": "^2.2.4",
    "@chakra-ui/react": "^3.5.1",
    "@emotion/react": "^11.14.0"
  }

画面を立ち上げてみると、以下エラーが表示
image.png

解決方法

@chakra-ui/reactをアンインストールして、再インストールでバージョンを「3.8.0」に上げることでWrapも正常に機能するようになった。
(なんで3.5.1でダウンロードされてたかは謎…)

Chakra uiの公式ページを参考にコマンド押下

npm uninstall @chakra-ui/react @emotion/react

からの

npm i @chakra-ui/react @emotion/react

これでchakra-ui/reactのバージョンをpackage.jsonで確認

package.json
  "dependencies": {
    "@chakra-ui/icons": "^2.2.4",
    "@chakra-ui/react": "^3.8.0",
    "@emotion/react": "^11.14.0",
    "axios": "^1.7.9",
    "next-themes": "^0.4.4",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "react-icons": "^5.4.0",
    "react-router-dom": "^7.1.5"
  }

バージョンが最新になっているか(または意図したバージョンになっているか)は
しっかり確認しましょう!
(これで何時間費やしたことか・)

0
0
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?