【问题标题】:Cannot read property 'trim' of undefined无法读取未定义的属性“修剪”
【发布时间】:2016-04-07 09:40:33
【问题描述】:

我有以下package.json 文件:

{
  "repository": {
  },
  "dependencies": {
    "brunch": "^1.8.5",
    "babel-brunch": "^5.1.1",
    "clean-css-brunch": ">= 1.0 < 1.8",
    "css-brunch": ">= 1.0 < 1.8",
    "javascript-brunch": ">= 1.0 < 1.8",
    "uglify-js-brunch": ">= 1.0 < 1.8",
    "sass-brunch": "~> 2.6.2"
  }
}

当我用mix phoenix.start 启动我的服务器时,我看到了这个错误:

TypeError: Cannot read property 'trim' of undefined
  at SassCompiler.compile (/Users/ryanbigg/Projects/elixir/twist/node_modules/sass-brunch/index.js:208:14)
  at /Users/ryanbigg/Projects/elixir/twist/node_modules/brunch/lib/fs_utils/pipeline.js:104:29
  at fn (/Users/ryanbigg/Projects/elixir/twist/node_modules/async-waterfall/index.js:19:24)
  at Immediate._onImmediate (/Users/ryanbigg/Projects/elixir/twist/node_modules/async-waterfall/index.js:58:22)
  at processImmediate [as _immediateCallback] (timers.js:383:17)

我在此处配置了哪些错误导致此错误发生?

【问题讨论】:

    标签: phoenix-framework brunch


    【解决方案1】:

    我在 Elixir Slack 上询问过这个问题,我们发现在 1.9.2 使用 sass-brunch 可以解决这个问题:

    "sass-brunch": "~> 1.9.2"
    

    【讨论】:

    • Brunch 最近发展很快,"brunch": "^2.0.0" 都使用了^2.0.0 版本的brunch 插件。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-19
    • 1970-01-01
    • 2021-03-12
    • 2019-12-08
    • 2020-04-06
    • 2021-03-03
    • 2020-10-30
    相关资源
    最近更新 更多