通过 Rails Bytes 安装 TailwindCSS 不起作用

时间:2021-02-02 10:50:09

标签: css ruby-on-rails tailwind-css

我有一个 Rails 应用程序,我想添加 TailwindCSS,以便我可以使用这个框架中的 css。我从网站 Rails Bytes 得到了一个 link,它应该负责安装。但是,在我执行此操作后,我没有注意到 Tailwindcss 的属性在我的应用中工作。

这是我执行 cli https://railsbytes.com/public/templates/VKAs5Q 时终端的输出

rails app:template LOCATION='https://railsbytes.com/script/XbBsG6'
         run  yarn add tailwindcss@yarn:@tailwindcss/postcss7-compat from "."
yarn add v1.22.10
info Merge conflict detected in yarn.lock and successfully merged.
[1/4] ?  Resolving packages...
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] ?  Building fresh packages...
success Saved lockfile.
success Saved 17 new dependencies.
info Direct dependencies
└─ tailwindcss@2.0.2
info All dependencies
├─ @fullhuman/postcss-purgecss@3.1.3
├─ acorn-node@1.8.2
├─ acorn-walk@7.2.0
├─ at-least-node@1.0.0
├─ camelcase-css@2.0.1
├─ css-unit-converter@1.1.2
├─ detective@5.2.0
├─ didyoumean@1.2.1
├─ html-tags@3.1.0
├─ lodash.toarray@4.4.0
├─ modern-normalize@1.0.0
├─ nanoid@3.1.20
├─ object-hash@2.1.1
├─ postcss-functions@3.0.0
├─ postcss-js@2.0.3
├─ purgecss@3.1.3
└─ tailwindcss@2.0.2
✨  Done in 6.87s.
         run  yarn add @tailwindcss/forms @tailwindcss/typography @tailwindcss/aspect-ratio from "."
yarn add v1.22.10
[1/4] ?  Resolving packages...
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] ?  Building fresh packages...
success Saved lockfile.
success Saved 6 new dependencies.
info Direct dependencies
├─ @tailwindcss/aspect-ratio@0.2.0
├─ @tailwindcss/forms@0.2.1
└─ @tailwindcss/typography@0.4.0
info All dependencies
├─ @tailwindcss/aspect-ratio@0.2.0
├─ @tailwindcss/forms@0.2.1
├─ @tailwindcss/typography@0.4.0
├─ lodash.castarray@4.4.0
├─ lodash.merge@4.6.2
└─ mini-svg-data-uri@1.2.3
✨  Done in 8.00s.
         run  mkdir app/javascript/stylesheets from "."
         run  touch app/javascript/stylesheets/application.scss from "."
      append  app/javascript/stylesheets/application.scss
         run  npx tailwindcss init from "."
  
   @tailwindcss/postcss7-compat 2.0.2
  
   ✅ Created Tailwind config file: tailwind.config.js
  
File unchanged! The supplied flag value not found!  app/javascript/packs/application.js
      insert  postcss.config.js
        gsub  tailwind.config.js
        gsub  tailwind.config.js
File unchanged! The supplied flag value not found!  app/views/layouts/application.html.erb

我真的不知道我需要在哪里检查以查看安装出了什么问题。让我知道您想从我的代码中看到什么,我会调整我的问题,以便您可以看到。

0 个答案:

没有答案