toString() bug #109

Open
wavded opened this Issue Jul 2, 2012 · 1 comment

Comments

Projects
None yet
2 participants

wavded commented Jul 2, 2012

I mentioned this in a node-canvas issue, but figured I would report it here as it originally stems from here in my case:

e.g. this fails:

background-image  : linear-gradient-image(200px, rgba(0,0,0,1), rgba(100,100,100,0.8))

with this error: (running latest nib)

DEBUG: error:  500: TypeError: /home/wavded/Projects/arc/node_modules/nib/lib/nib/gradients.styl:148
   144|   start = start[1] or 'top'
   145|   grad = create-gradient-image(size, start)
   146|   stops = normalize-stops(stops)
   147|   add-color-stop(grad, stop[0], stop[1]) for stop in stops
 > 148|   'url(%s)' % gradient-data-uri(grad)
   149| 

Cannot call method 'toString' of undefined
    at ".humane" (/home/wavded/Projects/arc/assets/css/lib/humane.styl:12)
 stack=TypeError: /home/wavded/Projects/arc/node_modules/nib/lib/nib/gradients.styl:148
   144|   start = start[1] or 'top'
   145|   grad = create-gradient-image(size, start)
   146|   stops = normalize-stops(stops)
   147|   add-color-stop(grad, stop[0], stop[1]) for stop in stops
 > 148|   'url(%s)' % gradient-data-uri(grad)
   149| 

Cannot call method 'toString' of undefined
    at ".humane" (/home/wavded/Projects/arc/assets/css/lib/humane.styl:12)

    at Canvas.toDataURL (/home/wavded/Projects/arc/node_modules/canvas/lib/canvas.js:174:37)
    at Gradient.toDataURL (/home/wavded/Projects/arc/node_modules/nib/lib/nodes/gradient.js:158:17)
    at Evaluator.exports.dataURL (/home/wavded/Projects/arc/node_modules/nib/lib/nodes/gradient.js:61:32)
    at Evaluator.invokeBuiltin (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/evaluator.js:794:30)
    at Evaluator.visitCall (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/evaluator.js:341:16)
    at Evaluator.Visitor.visit (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/evaluator.js:75:18)
    at Evaluator.visitBinOp (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/evaluator.js:396:20)
    at Evaluator.Visitor.visit (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/wavded/Projects/arc/node_modules/stylus/lib/visitor/evaluator.js:75:18), agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11, url=/css/layout.css?v=2.0.8, , v=2.0.8

I'm running into this same issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment