dbashford / mimosa-sass

A Mimosa module for SASS compiling
3 stars 1 forks source link

Error in CSSCompiler #4

Closed texastoland closed 8 years ago

texastoland commented 10 years ago

I've been struggling with this for hours: using mimosa-sass with node-sass (although disabling it didn't help) I get an error in CSSCompiler during watch that there is no #includeToBaseHash. When I set breakpoints #_processWatchedDirectories() is never called to initialize it.

Config
exports.config = {
  modules: ["sass", "copy", "just-copy", "stream-copy", "live-reload"],
  watch: {
    javascriptDir: null,
    exclude: [/\.(?:amf|appcache|jsb3|mdown|pdf|php|properties|py|rb|sql|tmp|xcf)$/],
    throttle: 10
  },
  sass: {
    lib: require("node-sass"),
    includePaths: "ext-styles"
  },
  justCopy: {
    paths: ["ext-5.0.0"]
  }
};
Stack trace
mimosa-sass/src/index.js:15
    return ( includeToBaseHash[fileName] || path.basename( fileName ).charAt( 
                              ^
TypeError: Cannot read property 'example.sass' of undefined
  at Object.isInclude (mimosa-sass/src/index.js:15:31)
  at CSSCompiler.module.exports.CSSCompiler._isInclude (mimosa/lib/modules/compilers/css.js:229:28)
  at CSSCompiler.module.exports.CSSCompiler._findBasesToCompile (mimosa/lib/modules/compilers/css.js:82:14)
  at Array.__bind [as 2] (mimosa/lib/modules/compilers/css.js:3:59)
  at module.exports.WorkflowManager._workflowMethod.next (mimosa/lib/util/workflow.js:272:26)
  at module.exports.WorkflowManager._workflowMethod.cb (mimosa/lib/util/workflow.js:281:16)
  at Array._init [as 1] (mimosa/lib/modules/compilers/css.js:36:10)
  at module.exports.WorkflowManager._workflowMethod.next (mimosa/lib/util/workflow.js:272:26)
  at module.exports.WorkflowManager._workflowMethod.cb (mimosa/lib/util/workflow.js:281:16)
  at Array._initMultiAsset [as 0] (mimosa/lib/modules/file/init.js:25:10)
  at module.exports.WorkflowManager._workflowMethod.next (mimosa/lib/util/workflow.js:272:26)
  at WorkflowManager.module.exports.WorkflowManager._workflowMethod (mimosa/lib/util/workflow.js:284:12)
  at module.exports.WorkflowManager._executeWorkflowStep.next (mimosa/lib/util/workflow.js:242:22)
  at WorkflowManager.module.exports.WorkflowManager._executeWorkflowStep (mimosa/lib/util/workflow.js:254:12)
  at WorkflowManager.module.exports.WorkflowManager.update (mimosa/lib/util/workflow.js:190:17)
  at WorkflowManager.__bind (mimosa/lib/util/workflow.js:2:59)
  at Watcher._fileUpdated (mimosa/lib/util/watcher.js:72:38)
  at Watcher.__bind [as _fileUpdated] (mimosa/lib/util/watcher.js:2:59)
  at FSWatcher.Watcher._startWatcher (mimosa/lib/util/watcher.js:45:20)
  at FSWatcher.emit (events.js:98:17)
  at FSWatcher.exports.FSWatcher.FSWatcher.emit (mimosa/node_modules/chokidar/lib/index.js:225:32)
  at exports.FSWatcher.FSWatcher._handleFile (mimosa/node_modules/chokidar/lib/index.js:155:22)
  at StatWatcher.exports.FSWatcher.FSWatcher._watch (mimosa/node_modules/chokidar/lib/index.js:138:20)
  at StatWatcher.emit (events.js:98:17)
  at StatWatcher._handle.onchange (fs.js:1109:10)

Process finished with exit code 8
dbashford commented 10 years ago

Have a sample repo you can throw up? We use that setup at work and don't have any issues. Not sure what might be tripping you up.

texastoland commented 10 years ago

Emailed it!

texastoland commented 10 years ago

The project I sent worked perfectly this morning 😐 The only difference is I stripped out 100 MB of static resources from the just-copy path. Similar issue to throttle? Working around.

dbashford commented 10 years ago

Will be a day or three before I can take a look. Swamped at work.

texastoland commented 10 years ago

I was copying the entire Ext JS archive using just-copy and stream-copy. Error vanished once I stripped down my static files around 25 MB I'm using for the Theme Viewer demo. Works for me. That volume of files is probably a rare use case.

dbashford commented 10 years ago

We are talking about the SASS compilation error?

texastoland commented 10 years ago

The stack trace originates in the CSScompiler used by mimosa-sass.