docpad / docpad-plugin-sass

Adds support for the SASS and SCSS CSS pre-processors to DocPad. It also supports the Compass framework.
Other
13 stars 6 forks source link

docpad-plugin-sass 2.4.5 doesn't work with docpad 6.32 #7

Closed saviomuc closed 11 years ago

saviomuc commented 11 years ago

When running docpad 6.32 with the sass plugin 2.4.5 the generation stucks at "Docpad listening to ...."

balupton commented 11 years ago

Thanks for this. Is this a new issue? Can you DocPad with the -d flag and upload the generated docpad-debug.log file somewhere?

saviomuc commented 11 years ago

Issue is new. At least last week when i was still rolling 6.31 I was able to generate the files perfectly. You can reproduce the bug with this https://github.com/saviomuc/docpadSassGridlessBoilerplate (a starting template that fits my needs, based on boilerplate)

that's the content:

debug: Plugins loading for: C:\Users\savio.van.hoi\Desktop\Projekte\test\node_modules → [2013-05-06 13:11:52.852] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: .bin → [2013-05-06 13:11:52.879] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: docpad → [2013-05-06 13:11:52.885] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: coffeescript → [2013-05-06 13:11:52.890] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: eco → [2013-05-06 13:11:52.895] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: livereload → [2013-05-06 13:11:52.900] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: marked → [2013-05-06 13:11:52.905] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: partials → [2013-05-06 13:11:52.912] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: sass → [2013-05-06 13:11:52.917] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: stylus → [2013-05-06 13:11:52.922] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loading plugin: text → [2013-05-06 13:11:52.927] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Skipped the unsupported plugin: docpad due to type → [2013-05-06 13:11:52.944] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: coffeescript → [2013-05-06 13:11:52.953] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: eco → [2013-05-06 13:11:52.960] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: livereload → [2013-05-06 13:11:52.967] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: partials → [2013-05-06 13:11:53.033] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: marked → [2013-05-06 13:11:53.039] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: sass → [2013-05-06 13:11:53.214] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: stylus → [2013-05-06 13:11:53.221] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Loaded plugin: text → [2013-05-06 13:11:53.227] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Plugins loaded for: C:\Users\savio.van.hoi\Desktop\Projekte\test\node_modules → [2013-05-06 13:11:53.232] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Performed the action load → [2013-05-06 13:11:53.250] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Performing the action ready → [2013-05-06 13:11:53.260] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: Welcome to DocPad v6.32.0 → [2013-05-06 13:11:53.288] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: Plugins: coffeescript vnull, eco vnull, livereload vnull, marked vnull, partials vnull, sass vnull, stylus vnull, text vnull → [2013-05-06 13:11:53.292] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: Environment: development → [2013-05-06 13:11:53.296] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Performed the action ready → [2013-05-06 13:11:53.318] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Performing the action run → [2013-05-06 13:11:53.326] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Starting server on port 9778 and directory C:\Users\savio.van.hoi\Desktop\Projekte\test\out → [2013-05-06 13:11:53.692] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: DocPad listening to http://localhost:9778/ on directory C:\Users\savio.van.hoi\Desktop\Projekte\test\out → [2013-05-06 13:11:53.709] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: socket.io started info: LiveReload listening to new socket on channel /docpad-livereload with log level 3 → [2013-05-06 13:11:54.032] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] info: Generating... → [2013-05-06 13:11:54.042] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] debug: Skipped directory: C:\Users\savio.van.hoi\Desktop\Projekte\test\src\partials (it does not exist) → [2013-05-06 13:11:54.080] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log] error: An error occured: Error: spawn ENOENT at errnoException (child_process.js:975:11) at Process.ChildProcess._handle.onexit (child_process.js:766:34) → [2013-05-06 13:11:54.724] [C:\Users\savio.van.hoi\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log]

balupton commented 11 years ago

Not sure why this would have happened. Can you try the suggestion here - https://github.com/docpad/docpad-plugin-sass/issues/6 - and let me know how it goes?

saviomuc commented 11 years ago

Already did With no effect. It's already in the docpad.coffee in the repository given above.

saviomuc commented 11 years ago

Okay, I was able to fix the problem by setting the compass property (true or false doesn't matter). It seems like the plugin is expecting at least these flags to be set.

sass:
   sassPath: 'c:/Ruby193/bin/sass.bat'
   scssPath: 'c:/Ruby193/bin/scss.bat'
   compass: true
balupton commented 11 years ago

Interesting, do you have compass installed? do you use compass?

saviomuc commented 11 years ago

Sorry, I think the problem has nothing to do with docpad 6.32 nor docpad-plugin-sass 2.4.5. At home I couldn't reproduce the bug. Turns out at work (where the problem occured) I had node 0.10.5 installed while at home I still had node 0.8 installed. So I tried to hunt down the bug:

Starting configuration: node 0.8, docpad 6.31, docpad-plugin-sass 2.4.5

  1. Update to docpad 6.34.1 - still works
  2. Update to node 0.10.5 - doesn't work anymore
  3. Reinstall docpad 6.34.1 - Error message: formidable 1.0.13 wanted node <0.9.0 current: node: 0.10.5
  4. Install formidable@latest (1.0.14) - Still doesn't work
  5. Add "compass: true" to docpad.coffee - works

So the bug may have something to do with formidable. Further Information:

I think I will downgrade to node 0.8 and wait for the issue to be resolved.

balupton commented 11 years ago

Should be fixed with the latest docpad v6.40.0 and the latest plugin version v2.5.0, I've done some improvements in this area. Closing, happy to re-open :)

saviomuc commented 11 years ago

Unfortunately it doesn't seem to work. Maybe you could just update the documentation that these options have to be set:

   sassPath: 'pathToSass'
   scssPath: 'pathToScss'
   compass: true
balupton commented 11 years ago

Hrmm, what are your values for that, and what is the value of node -e "console.log(process.env.PATH)" when executed.

saviomuc commented 11 years ago

Values are sass: sassPath: 'c:/Ruby193/bin/sass.bat' scssPath: 'c:/Ruby193/bin/scss.bat' compass: true

and when I execute Path it shows the correct Path for Ruby, Sass and Compass

balupton commented 11 years ago

Ohhh... .bat files! That's unusual. I think I'll be able to fix the autodetection, as for windows we require the full path, so we try sass then sass.cmd, but we don't try .bat, I'll add that to the list of things to try.

balupton commented 11 years ago

Okay, I've updated bevry/safeps to add support for .bat aliases.

Can you try the following npm install --force docpad-plugin-sass to get the latest version (without cache), and then try remove the sassPath, scssPath, and compass configuration to see if we can autodetect them.

Thanks! Will close it, and if it is still an issue will re-open :)

balupton commented 11 years ago

Whoops, try now. Hadn't published it yet.

saviomuc commented 11 years ago

Sorry for late reply. Works flawlessly now. Thank you very much