ruby-on-rails SassC::SyntaxError:错误:未找到或无法读取要导入的文件:tailwindcss/base.>> @import 'tailwindcss/base';

kx5bkwkv  于 2023-10-21  发布在  Ruby
关注(0)|答案(1)|浏览(148)

我得到这个日志,而做上限部署不能理解为什么这个问题presist任何帮助?

这是我的capistrano.log文件我粘贴

Done in 604ms.
warning ../../package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning webpack-dev-server > webpack-dev-middleware > [email protected]: this will be v4
warning ../../package.json: No license field
rake aborted!
SassC::SyntaxError: Error: File to import not found or unreadable: tailwindcss/base.
        on line 5200:1 of stdin
>> @import 'tailwindcss/base';  

   ^
stdin:5200
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sassc-rails-2.1.2/lib/sassc/rails/compressor.rb:29:in `call'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/sass_compressor.rb:30:in `call'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:84:in `call_processor'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:182:in `load_from_unloaded'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/sprockets-1.2.2/lib/concurrent-ruby/concurrent/promise.rb:564:in `block in realize'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `run_task'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:343:in `block (3 levels) in create_worker'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `loop'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block (2 levels) in create_worker'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `catch'
/var/www/beachfireguy/shared/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `block in create_worker'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

这是我的tailwind.js

module.exports = {
  content: [ 
    './app/**/*.html',
    './app/**/*.erb',
    './app/**/*.js',
    './app/**/*.jsx',
    './app/**/*.ts',
    './app/**/*.tsx',
    './app/**/*.css',
    './app/**/*.scss',
    ],
  theme: {
    extend: {},
  },
  plugins: [],
}

这是application.tailwind.css

@import 'tailwindcss/base'; 
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
jjhzyzn0

jjhzyzn01#

我不知道为什么,但我不得不在这些文件上添加.css扩展名才能工作。

@import 'tailwindcss/base.css'; 
@import 'tailwindcss/components.css';
@import 'tailwindcss/utilities.css';

相关问题