![見出し画像](https://assets.st-note.com/production/uploads/images/114040193/rectangle_large_type_2_1d117c58c546ac2c4cd2d5e3165cc004.png?width=1200)
Photo by
mitsuki_haruta
【IT】Tailwind CSSのVSCodeでのエラーについて
皆さま
こんにちは
Next.jsとTailwind CSSを設定し、globals.cssに設定時に
以下の警告が出ます。
![](https://assets.st-note.com/img/1692707395078-5sdbhd9ejm.jpg?width=1200)
使用上は問題ありませんが、不要なエラーは、解消します。
先ず、「Tailwind CSS IntelliSense」がVS Codeにインストールします。
私の場合は、既にインストールされておりましたが、
設定が足りないようです。
![](https://assets.st-note.com/img/1692707564105-s8ri2musNq.jpg?width=1200)
「settings.json」に設定を追加します。
ショートカットキー
Macの場合:command + shift + P
Windowsの場合: Ctrl + Shift + P
でコマンドパレットを表示します。
次に検索ワードで
「設定」(英語の場合は、settings」を入力し、
「日本語化済みなら基本設定: 設定(JSON)を開く」
(英語の場合は、Preferences: Open Settings(JSON))
を開きます。
"files.associations"の項目に
"*.css": "tailwindcss"を追加します。
![](https://assets.st-note.com/img/1692708051256-3CyetFG1vv.jpg?width=1200)
設定を保存し、VS Codeを再起動すると警告は、消えました。
![](https://assets.st-note.com/img/1692708162030-Oxg8BuAMMY.jpg?width=1200)
では