sass-brunch icon indicating copy to clipboard operation
sass-brunch copied to clipboard

Empty compilation output

Open proxygear opened this issue 9 years ago • 10 comments

Hi,

Compilation generates empty output. I set couple of sass/scss files :

  • fubar.css
  • fubar.sass
  • fubar.scss

it compiles a app.css file with only content from the fubar.css file. The app.css.map contain the following informations : "sourcesContent":["h1{\n font-weight: 200;\n}\n","",""] where the two last empty string comme from fubar.sass and fubar.scss

However fubar.sass and fubar.scss are really compiled. If I drop some error in those files, brunch ouput thoses error in the console.

Any idea ?

  • sass --version : Sass 3.4.19
  • brunch --version : 1.8.5
  • node --version : v0.10.32
  • sass-brunch version : 1.9.1

Brunch config, coming from elixir initialisation :

exports.config = {
  // See http://brunch.io/#documentation for docs.
  files: {
    javascripts: {
      joinTo: "js/app.js"
    },
    stylesheets: {
      joinTo: "css/app.css"
    },
    templates: {
      joinTo: "js/app.js"
    }
  },

  conventions: {
    assets: /^(web\/static\/assets)/
  },

  // Phoenix paths configuration
  paths: {
    // Dependencies and current project directories to watch
    watched: [
      "deps/phoenix/web/static",
      "deps/phoenix_html/web/static",
      "web/static",
      "test/static"
    ],

    // Where to compile files to
    public: "priv/static"
  },

  // Configure your plugins
  plugins: {
    babel: {
      // Do not use ES6 compiler in vendor code
      ignore: [/web\/static\/vendor/]
    },
    sass: {
      // debug: 'comments',
      // mode: 'native',
      options: {
        includePaths: ['bower_components/foundation/scss'],
      }
    }
  },

  modules: {
    autoRequire: {
      "js/app.js": ["web/static/js/app"]
    }
  },

  npm: {
    enabled: true
  }
};

proxygear avatar Nov 07 '15 13:11 proxygear

Not sure if you have solved the issue.

What happens when you would have 3 different filenames?

paulmillr avatar Nov 13 '15 09:11 paulmillr

Same, I should have told that already, file name does not matter (each same of different, one by one or all together). What is concerning me is that passing mode: "native" or not does not change anything. Is there any way I can hook some code before/after the binary call. Even a monkey patch like adding a "print" line directly in the sources may help. It would allow me to check what is the exact cmd triggered to try it manually and monitor returned variables. So I would be see more what is happening between dependencies clash or miss configuration.

proxygear avatar Nov 14 '15 22:11 proxygear

Up, i've same problem for my app.scss :(

compiled app.scss into app.min.css in 954ms

But my app.min.css is empty, but my source map have full line.

stephane-r avatar Mar 24 '16 13:03 stephane-r

Exactly this problem I am facing as well.

It seems to happen more-or-less randomly, i.e. I cannot seem to find a pattern in it. But once it happens, it stays broken until I restart Brunch.

Qqwy avatar Mar 31 '16 18:03 Qqwy

@paulmillr A fix is planned soon ? : )

stephane-r avatar Apr 04 '16 14:04 stephane-r

@paulmillr I up this ticket, any solution for this problem ?

stephane-r avatar Jul 15 '16 07:07 stephane-r

Hey, @LeG3nDz, could you please give me some info so that I can help you: sass --version ? brunch --version ? node --version ? sass-brunch version ?

shvaikalesh avatar Jul 15 '16 12:07 shvaikalesh

I posted a similar question to the Stackoverflow.

It is strange that my problem does not occur on my Mac, but on Ubuntu 16.04.

The Ubuntu box is freshly installed on Virtualbox.

Here is my environment:

  • Ubuntu 16.04 Desktop
  • Phoenix 1.2.5
  • Node.js 8.9.1
  • npm 5.5.1
  • Brunch 2.10.7
  • sass-brunch 2.10.4

I also have installed inofity-tools package.

kuroda avatar Nov 15 '17 09:11 kuroda

I found a workaround.

Put these lines to the brunch-config.js:

  watcher: {
    usePolling: true
  }

As the documentation of Brunch says, watcher gets slower but can be more reliable by setting true to this option.

At least on my environment, situation has improved cleary.

kuroda avatar Nov 15 '17 11:11 kuroda

Solved my problem on Ubuntu 16.04.

otuv avatar Apr 13 '18 20:04 otuv