-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
I am running into a serious blocker when I attempt to deploy my Rails 7.0.5 project (using Ruby 3.1.2) to my Ubuntu 20.04 server. My project was setup using the rails --css tailwind option so tailwindcss-rails was preinstalled. Everything works just fine in development mode, but when I deploy using Capistrano I end of getting a bunch of errors beginning with the following one, all related to tailwindcss. I have made sure to configure bundler as prescribed using bundle lock --add-platform <platform-name> with the appropriate info for my platform.
bundler:install
01 $HOME/.rbenv/bin/rbenv exec bundle install --jobs 4 --quiet
✔ 01 [email protected] 51.372s
01:20 deploy:assets:precompile
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01
01 Rebuilding...
01 Error: Cannot find module 'tailwindcss/defaultTheme'
01 Require stack:
01 - /var/www/ai_demo/releases/20230526122825/config/tailwind.config.js
01 at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
01 at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)
01 at Function.resolve (node:internal/modules/cjs/helpers:108:19)
01 at _resolve (/snapshot/tailwindcss/node_modules/jiti/dist/jiti.js:1:241025)
01 at jiti (/snapshot/tailwindcss/node_modules/jiti/dist/jiti.js:1:243309)
01 at /var/www/ai_demo/releases/20230526122825/config/tailwind.config.js:1:97
01 at jiti (/snapshot/tailwindcss/node_modules/jiti/dist/jiti.js:1:245784)
01 at /snapshot/tailwindcss/lib/lib/load-config.js:37:30
01 at loadConfig (/snapshot/tailwindcss/lib/lib/load-config.js:39:6)
01 at Object.loadConfig (/snapshot/tailwindcss/lib/cli/build/plugin.js:135:49) {
01 code: 'MODULE_NOT_FOUND',
01 requireStack: [
01 '/var/www/ai_demo/releases/20230526122825/config/tailwind.config.js'
01 ]
01 }
01 rake aborted!
01 Command failed with exit 1: /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/tailwindcss-rails-2.0.29-x86_64-linux/exe/x86_64-lin…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/tailwindcss-rails-2.0.29-x86_64-linux/lib/tasks/build.rake:7:in system'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/tailwindcss-rails-2.0.29-x86_64-linux/lib/tasks/build.rake:7:in block (2 levels…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>'
01 /home/deploy/.rbenv/versions/3.1.2/bin/bundle:25:in load'
01 /home/deploy/.rbenv/versions/3.1.2/bin/bundle:25:in <main>'
01 Tasks: TOP => assets:precompile => tailwindcss:build
01 (See full trace by running task with --trace)
Here is my tailwind.config.js
const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
content: [
'./public/*.html',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*.{erb,haml,html,slim}',
"./node_modules/flowbite/**/*.js",
],
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
require('flowbite/plugin'),
]
}
Metadata
Metadata
Assignees
Labels
No labels