sass-eyeglass / broccoli-eyeglass

Integrates Eyeglass and the broccoli build system.
15 stars 19 forks source link

TypeError: Cannot read property 'init' of undefined in broccoli-caching-writer #4

Closed mikl closed 9 years ago

mikl commented 9 years ago

I have a simple Brocfile.js, it looks like this:

var compileSass = require('broccoli-eyeglass');

var tree = 'sass';

var options = {
  cssDir: "css",
  fullException: false,
  sourceFiles: [
    'style.scss',
    'print.scss',
  ]
}

module.exports = compileSass(tree, options);

But when I try to compile it via Broccoli, I get a nasty TypeError, full traceback looks like this:

⌁68% [mikl:~/Work/Liip/mumble/mumble/repository/themes/neocortex] master(+2/-2)+* ± broccoli build dist
/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli-eyeglass/node_modules/broccoli-caching-writer/node_modules/core-object/core-object.js:16
    if (this.init) {
            ^
TypeError: Cannot read property 'init' of undefined
    at Class (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli-eyeglass/node_modules/broccoli-caching-writer/node_modules/core-object/core-object.js:16:13)
    at Object.<anonymous> (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/Brocfile.js:14:18)
    at Module._compile (module.js:426:26)
    at Object.Module._extensions..js (module.js:444:10)
    at Module.load (module.js:351:32)
    at Function.Module._load (module.js:306:12)
    at Module.require (module.js:361:17)
    at require (module.js:380:17)
    at Object.loadBrocfile (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/lib/builder.js:231:14)
    at getBuilder (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/lib/cli.js:62:23)
    at Command.<anonymous> (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/lib/cli.js:31:21)
    at Command.listener (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:87:13)
    at Command.emit (events.js:172:7)
    at Command.parseArgs (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/node_modules/commander/index.js:610:12)
    at Command.parse (/Users/mikl/Work/Liip/mumble/mumble/repository/themes/neocortex/node_modules/broccoli/node_modules/commander/index.js:458:21)

These are the package versions I have installed:

 "devDependencies": {
    "breakpoint-sass": "^2.6.1",
    "broccoli": "^0.16.3",
    "broccoli-eyeglass": "^0.1.3",
    "eyeglass": "^0.2.0",
    "node-sass": "^3.1.2",
    "sass-toolkit": "^2.9.0",
    "singularitygs": "^1.6.2"
  }

And I'm running iojs v2.2.1 on OS X 10.10.3.

asakusuma commented 9 years ago

I'm running into the same issue

eoneill commented 9 years ago

I think this is the same issue per #6.

The README had incorrect information.

compileSass(tree, options)

should be...

new compileSass(tree, options)

The README has been updated with correct instructions.