【问题标题】:What is this error when pushing Rails App to Heroku将 Rails 应用程序推送到 Heroku 时出现什么错误
【发布时间】:2021-11-22 02:40:23
【问题描述】:

现在我无法弄清楚这个错误已经有一段时间了,我在将它推送到 Heroku 时收到。

ERROR in ./app/javascript/stylesheets/application.scss
remote:        Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
remote:        ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
remote:        ParserError: Syntax Error at line: 1, column 25

完整的错误信息:https://gist.github.com/zilton7/bbac886c75523aab75bc3561ec22ed55

我已经为 application.scss 尝试了许多变体,但是一旦我取消了 bootstrap 的注释,我就会遇到上述问题。

应用程序.scss

// @import "~bootswatch/dist/darkly/variables";
@import "~bootstrap/scss/bootstrap";
// @import "~bootswatch/dist/darkly/bootswatch";

// @import "trix/dist/trix";

// @import "custom"

【问题讨论】:

  • 认为 ~ 是不必要的。你试过@import "bootstrap/scss/bootstrap";
  • 刚试了一下,好像没什么用……

标签: ruby-on-rails heroku sass bootstrap-5


【解决方案1】:

我在 Heroku 上部署我的 rails 应用程序时遇到了同样的问题。我通过更改 package.json 文件中的引导版本来解决此问题

来自:

收件人:

来源:https://github.com/rails/webpacker/issues/3188

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-01
    • 1970-01-01
    • 2021-03-13
    • 1970-01-01
    • 1970-01-01
    • 2010-12-30
    • 2012-04-18
    • 1970-01-01
    相关资源
    最近更新 更多