bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

Error in express view engine when environment set to 'production' #169

Closed mahnunchik closed 11 years ago

mahnunchik commented 11 years ago
/node_modules/blade/lib/blade.js:41
            var cacheKey = JSON.stringify(options);
                                ^
TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at compile (/node_modules/blade/lib/blade.js:41:24)
    at /node_modules/blade/lib/blade.js:78:4
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

https://github.com/bminer/node-blade/blob/master/lib/blade.js#L41

staryj commented 11 years ago

+1

mahnunchik commented 11 years ago

express version: 3.2.0

bminer commented 11 years ago

This is a bummer... I wonder what the options Object looks like when Express passes it to the __render function...

bminer commented 11 years ago

I think that the solution here is to only "stringify" the Blade compiler options, excluding the other fields in options.