You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to run this lib in a express service?
I have to do a service to convert css codes to sass codes.
I tried do make this but when I call the convert({from: 'css', to: 'sass'}) I get this following error:
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn sass-convert ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn sass-convert',
path: 'sass-convert',
spawnargs: [ '--from=css', '--to=sass', '--stdin', '--no-cache' ]
}
My code:
app.post(["/v1/css-to-sass/"], (req, res) => {
var inputStreamReq;
req.pipe(req.busboy);
req.busboy.on('file', function (fieldname, file, filename) {
console.log("Uploading: " + filename);
const name = uuidv1();
inputStreamReq = fs.createWriteStream(__dirname + '/../model/' + name + '.css');
file.pipe(inputStreamReq);
inputStreamReq.on('close', () => {
vfs.src(__dirname + '/../model/' + name + '.css')
.pipe(converter({
from: 'css',
to: 'sass'
}))
.pipe(vfs.src(__dirname + '/../model/'));
res.send('');
});
});
The text was updated successfully, but these errors were encountered:
our sass-convert package is buggy and unmaintained. I would recommend not using it.
It's trying to access the old Ruby Sass binary, which leads to several issues.
Hi guys!
Is there a way to run this lib in a express service?
I have to do a service to convert css codes to sass codes.
I tried do make this but when I call the convert({from: 'css', to: 'sass'}) I get this following error:
My code:
The text was updated successfully, but these errors were encountered: