These are chat archives for jescalan/roots

29th
May 2015
Noel Quiles
@EnMod
May 29 2015 15:38
Problem...
[Error: Error: C:\Users\quilesn\Documents\GitHub\bleig\assets\css\style.css.styl:1
  > 1| extends _layout
    2|
    3| block content
    4|  h1= entry.title

ENOENT, no such file or directory 'C:\Users\quilesn\Documents\GitHub\bleig\assets\css\_layout.jade']

Potentially unhandled rejection [4] Error: C:\Users\quilesn\Documents\GitHub\bleig\assets\css\style.css.styl:1
  > 1| extends _layout
    2|
    3| block content
    4|  h1= entry.title

ENOENT, no such file or directory 'C:\Users\quilesn\Documents\GitHub\bleig\assets\css\_layout.jade'
  at Object.fs.openSync (fs.js:427:18)
  at Object.fs.readFileSync (fs.js:284:15)
  at Parser.parseExtends (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:488:18)
  at Parser.parseExpr (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:221:21)
  at Parser.parse (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:122:25)
  at parse (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:104:21)
  at Object.exports.compile (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:205:16)
  at handleTemplateCache (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:174:25)
  at Object.exports.render (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:349:10)
  at C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:14:24
  at compile (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:30:15)
  at Jade._render (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:14:5)
  at Jade.Adapter.render (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapter_base.coffee:88:6)
  at Jade.wrapper (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\lodash\index.js:3543:19)
  at tryCatchReject (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:845:30)
  at runContinuation1 (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:804:4)
  at Fulfilled.when (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:592:4)
  at Pending.run (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:483:13)
  at Scheduler._drain (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\Scheduler.js:62:19)
  at Scheduler.drain (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\Scheduler.js:27:9)
  at process._tickCallback (node.js:415:13)
Christie Communications
@techchristie
May 29 2015 15:40
Following the accord/postcss stuff from above, still no luck.
Noel Quiles
@EnMod
May 29 2015 15:40
What error are you getting, techchristie?
Christie Communications
@techchristie
May 29 2015 15:40
none
just doesnt render the postcss
Noel Quiles
@EnMod
May 29 2015 15:40
It just isn't applying the render?
Oh
Christie Communications
@techchristie
May 29 2015 15:41
also you error looks like you have jade in a styl/css file?
Noel Quiles
@EnMod
May 29 2015 15:41
I don't though, and that's what is bugging me lol
Christie Communications
@techchristie
May 29 2015 15:41
weird
Noel Quiles
@EnMod
May 29 2015 15:41
I have no idea why it's looking for that
It's reading a view in place of my stylus file
VERY weird
For your issue, my four steps haven't worked?
Christie Communications
@techchristie
May 29 2015 15:44
ya, i install the git master of accord
doesnt even seem like postcss is being called.. put a bunch of logs in and nothing comes out
Noel Quiles
@EnMod
May 29 2015 15:45
So you installed it to the Roots module's directory itself?
As opposed to your project?
I don't think I was clear enough in saying that
Sorry
Christie Communications
@techchristie
May 29 2015 15:45
oh..
that could be it
so i need to update accord within the global roots module?
Noel Quiles
@EnMod
May 29 2015 15:46
Yes, well put
:+1:
Christie Communications
@techchristie
May 29 2015 15:46
that actually makes a bunch of sense
Noel Quiles
@EnMod
May 29 2015 15:47
Yeah my apologies for the misleading step
Christie Communications
@techchristie
May 29 2015 15:47
no worries, i was lurking before and just scrubbed all the comments
now where is it located hah
Noel Quiles
@EnMod
May 29 2015 15:48
lol which OS are you using?
Christie Communications
@techchristie
May 29 2015 15:48
osx
Noel Quiles
@EnMod
May 29 2015 15:48
ok
Hmm...
Trying to remember where the global npm install folder is on OSX lol
Well, Roots global will be under node_modules in that folder
Christie Communications
@techchristie
May 29 2015 15:50
/usr/local/lib/node_modules ??
Noel Quiles
@EnMod
May 29 2015 15:50
yep
Just found out
oh nah
/usr/local/lib/npm/node_modules
I think...? I use a Windows machine so I'm calling on basic Linux knowledge
Christie Communications
@techchristie
May 29 2015 15:54
mine was correct, no npm folder...
Noel Quiles
@EnMod
May 29 2015 15:54
Shows how much I know
Christie Communications
@techchristie
May 29 2015 15:54
well maybe, still doesnt seem to work
nm, success, cache clean
Noel Quiles
@EnMod
May 29 2015 15:58
Nice :smile:
Christie Communications
@techchristie
May 29 2015 15:58
thanks for the assist!
now for accord to be officially updated, cause I don't wanna have to walk through that with the rest of my team
Noel Quiles
@EnMod
May 29 2015 16:04

No prob :+1: yeah can't wait for @jenius or another dev to come back and publish that new version of accord with a new roots version, so it's all there.

In other news, I have an addendum to my earlier issue: I have run roots watch on the problematic directory, and watched the console as I saved files, hoping to see proper compilation. However, on changing my views and saving them there is no recompile! so I change my stylus files and save, and there goes the issue again!

This leads me to believe that:

  • Roots now thinks my assets/css directory is my views directory
  • Roots is somehow reading from views when compiling the Stylus files in assets/css
  • it's possible my process to update accord from git is having unforseen consequences
Let's really hope it isn't the last part on my list. I haven't downgraded accord to test yet
Christie Communications
@techchristie
May 29 2015 16:08
you could add and after hook in your app.coffee to see what dirs its looking at
Noel Quiles
@EnMod
May 29 2015 16:42
That's a good call, will do
Noel Quiles
@EnMod
May 29 2015 16:48
...what would I enter into app.coffee to display that info?
after:
    foo()
?
Christie Communications
@techchristie
May 29 2015 16:51
its a function
after: (rootsObj) -> console.log(roots)
oops log(rootsObj) obvs
Noel Quiles
@EnMod
May 29 2015 16:52

nice thanks, so for this:

after: log(path) -> console.log(roots)

Christie Communications
@techchristie
May 29 2015 16:52
after: (roots) -> console.log(roots)
you wanna log the param
Noel Quiles
@EnMod
May 29 2015 16:53
ah of course
Christie Communications
@techchristie
May 29 2015 16:53
not sure how helpful it will be
Noel Quiles
@EnMod
May 29 2015 16:57
It gives me what I think is the problem, and idk how this happened: the filename and _path locals have somehow been redefined.
locals:
      { marked: [Object],
        js: [Function],
        css: [Function],
        contentful: [Object],
        asset: [Function],
        entry: [Object],
        filename: 'C:\\path-to-project\\assets\\css\\style.css.styl',
        _path: '/css/style.css',
        header: true,
        use: [Object],
        sourcemap: [Object],
        pretty: true },
That should not be happening, I'm sure
Christie Communications
@techchristie
May 29 2015 17:01
ya.. looks like your locals absorbed some other values
mind dumping your app.coffee on pastebin or something?
maybe its a silly formatting issue with coffeescript (in/outdent)
actually, i have similar values.. but im not getting issues
There's my app.coffee...idk why you aren't having issues but I am lol
strange
Christie Communications
@techchristie
May 29 2015 17:08
dont need css_pipeline
stylus is used by default
Noel Quiles
@EnMod
May 29 2015 17:09
Huh
Christie Communications
@techchristie
May 29 2015 17:09
in extensions, remove css_pipeline?
Noel Quiles
@EnMod
May 29 2015 17:09
still a rookie I suppose the "huh" was more of an onomatopeia
I will get the hang of all this eventually, and clean the cruft
Thanks
It was working fine so far with the pipelines in
Well now to test without
not so far
I mean before the issues
Nope
Still the same issue
Christie Communications
@techchristie
May 29 2015 17:12
not sure then, id say start stepping your changes back till you get to a working point
Noel Quiles
@EnMod
May 29 2015 17:13
Ohhhhh boy...well that seems to be the only choice then it seems. thanks for all your help thus far
Noel Quiles
@EnMod
May 29 2015 17:57
been backtracking a ton, no dice
somehow those locals are what seem to be doing me in
I read this in the v2 > v3 upgrade guide for roots
Ah actually the global path is now _path. filename also works, but is provided by jade, not roots itself, so it will only work in jade files.
So I'm thinking it could have to do with something v1.10.0 of jade did after I ran it before
I have since downgraded to see if that did anything...nope
Noel Quiles
@EnMod
May 29 2015 18:11
this line in compiler.coffee is where those locals are set, I really don't know where things could have gone wrong if not for on this line, since I'm really not sure my filename and _path locals make sense...I guess those locals are for the postcss adapter or something?
what I still don't get is why, somehow, my views path has been changed to assets/css
Noel Quiles
@EnMod
May 29 2015 18:21
...I'm going to wipe the slate clean and reinstall roots, and start again. Rather than backtrack I'll nuke it from orbit and rebuild
Christie Communications
@techchristie
May 29 2015 18:34
hah thats one way to go
Noel Quiles
@EnMod
May 29 2015 18:37
lol sometimes you just have to wipe it clean. Seems my strategy has removed the error, so let's see what went wrong when I started making my changes for postcss. First I'll install accord from master
Noel Quiles
@EnMod
May 29 2015 18:56
Wow...
I don't get it, I'm running it again using my exact steps, it is failing
same exact issue...what changed since yesterday?
Nothing has been committed for days, so...
in that case it seems to be the install of accord causing the issue, but it isn't causing a problem on your end, yes? I'll try with a different project
Ooooooooook, everything works in another project of mine. something must be wrong with how I have this one set up.
Though again, nothing changed since yesterday
Noel Quiles
@EnMod
May 29 2015 19:05
Ok...so I commented out roots-contentful from extensions=[] in my problematic project's app.coffee, all is well. That extension seems to be shifting my directories around for whatever reason. the problem is, the problem project is my blog!
at least we know where the problem lies
Christie Communications
@techchristie
May 29 2015 19:06
no idea, not familiar with contentful
Noel Quiles
@EnMod
May 29 2015 19:08
Ah, well I'm sure I can narrow it down now that I've cornered where it's coming from.
If anyone else with familiarity can help that's of course appreciated
Noel Quiles
@EnMod
May 29 2015 20:07
Ok I think I've cornered it. when I comment out the template and path properties of the roots-contentful settings in app.coffee, things work again. My app.coffee: http://pastebin.com/W1LuDJth