Every time I attempt to compile Sass code using sass.js, I encounter
{line: 0, message: "Unknown command undefined"}
in the console.
<html>
<body></body>
<script src="dist/sass.js"></script>
<script>
var sass = new Sass();
var scss = '$someVar: 123px; .some-selector { width: $someVar; }';
sass.compile(scss, function callback(result) {
console.log(result);
});
</script>
</html>
The source of this error seems to be coming from sass.worker.js:
var method = methods[event.data.command] || Sass[event.data.command];
if (!method) {
return done({
line: 0,
message: "Unknown command " + event.action,
});
}
method.apply(Sass, (event.data.args || []).concat([done]));
I haven't been able to find any similar cases of this issue, so any assistance would be greatly appreciated.