LoginSignup
0
0

More than 1 year has passed since last update.

【Nuxt.js】Netlifyデプロイ時にError: Cannot find module '@nuxtjs/tailwindcss'が表示される

Posted at

NuxtとTailwindcssでアプリを作成中、
Netlifyにデプロイしようとしたら、

✖ Nuxt Fatal Error  

Error: Cannot find module '@nuxtjs/tailwindcss'
Require stack:  
- /opt/build/repo/node_modules/@nuxt/core/dist/core.js

上記が表示されてしまい、デプロイができませんでした。

運良く、
エラーコードで解決方法がわかったので、
備忘録として投稿します(o'∀')ノ

Cannot find module '@nuxtjs/tailwindcss' - Deploy on Laravel Forge #9

$ yarn add @nuxtjs/tailwindcss

上記のコマンドで正常にデプロイができました。
上記のコマンドでインストールをしたと思っていたのですが、
--devなどのオプションが付いていたのかもしれません。

Nuxtで最初から、Tailwindcssを使用する場合は
上記のコマンド後、

nuxt.config.jsに以下を記載

buildModules: [
  '@nuxtjs/tailwindcss'
]

これでNetlifyにデプロイして、正常に動きます!

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