json-sass icon indicating copy to clipboard operation
json-sass copied to clipboard

jsonSass.convertJs() is undefined v1.3.5

Open danjvickers opened this issue 10 years ago • 0 comments

I'm pretty new to nodeJS so please excuse any misunderstanding on how this should be used.

I'm including via var jsonSass = require( 'json-sass' ); in my JS file.

When i'm using the jsonSass.convertJs( [1,2,3] ) function I get the following console error: 'Fatal error: undefined is not a function'

I've worked around this locally by changing jsonSass.js file:

from: exports.convertJs = jsToSassString;

to: module.exports.convertJs = jsToSassString;

This resolves the issue, but clearly my local fix will be overwritten when building the project from scratch so this is far from ideal.

I'm not sure if this is a bug with v 1.3.5 or if my understanding of the usage is incorrect.

Any help would be greatly received.

EDIT: I've just downgraded to 1.2.1 and this has resolved the issue for me.

danjvickers avatar Jul 21 '15 22:07 danjvickers